unified_texts
stringlengths
32
30.1k
OpenStatus_id
int64
0
4
input_ids
list
token_type_ids
list
attention_mask
list
How do I host a subdomain without hosting the domain? === I have a client who has purchased a domain through godaddy.com. They've outsourced and hosted that domain through marketing company (they're taking care of the top level domain). And I'd like to host a subdomain through hosting that I currently have set up (Arvixe.com). I'm unsure what needs to happen for this to work. Would I just have the client create the subdomain on Godaddy and change the nameservers there, or is something else involved? Any help is appreciated! Thanks!
0
[ 2, 184, 107, 31, 2015, 21, 972, 537, 6232, 366, 10637, 14, 4603, 60, 800, 3726, 3726, 31, 57, 21, 6819, 72, 63, 2432, 21, 4603, 120, 162, 25078, 9, 960, 9, 59, 22, 195, 70, 12097, 43, 17, 2812, 30, 4603, 120, 4743, 237, 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 should I use the AntiXSS library with the Knockout library? === In a project at work, I've recently been assigned to encode the user input using the AntiXSS library (v. 4.2.1), even though it's as good as abandoned and doesn't even have documentation for the latest version. I looked around a bit and found that I could use something like this for the input: <input type="text" value='<%= Microsoft.Security.Application.AntiXss.HtmlEncode() %>' /> Unfortunately, the project I'm working on uses the Knockout library, so if I have: <input type="text" data-bind="value: Something" /> Would something like this be possible? <input type="text" data-bind="value: <%= Microsoft.Security.Application.AntiXss.HtmlEncode(Something) %>" />
0
[ 2, 184, 378, 31, 275, 14, 1082, 396, 18, 18, 1248, 29, 14, 11676, 1248, 60, 800, 3726, 3726, 19, 21, 669, 35, 170, 15, 31, 22, 195, 1989, 74, 2467, 20, 20523, 14, 4155, 6367, 568, 14, 1082, 396, 18, 18, 1248, 13, 5, 710, 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...
Duplicate attribute error in AndroidMainfest.xml while adding a new activity === I am very much new to android development. I was making a simple text field and 'send' button to display whatever the user typed in the text field. The program is completely illustrated in the android training tutorials by android.com. url [here's the page] But whenever I'm adding the activity DisplayMessageActivity, i'm getting "Duplicate attribute" as an error. Here's the code... <application <activity android.name="DroidStart"/> <activity android:name="com.start.droidstart.DisplayMessageActivity" android:label="@string/title_activity_droid" > <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> </application> Please help this newbie :) [1]: http://developer.android.com/training/basics/firstapp/starting-activity.html#top
0
[ 2, 19429, 35, 14755, 7019, 19, 13005, 6232, 9962, 9, 396, 8184, 133, 4721, 21, 78, 2358, 800, 3726, 3726, 31, 589, 253, 212, 78, 20, 13005, 522, 9, 31, 23, 544, 21, 1935, 1854, 575, 17, 13, 22, 18, 2451, 22, 5167, 20, 3042, 20...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
cache_counter with has_many === I found out from some other posts that cache_counter cant be done on a has_many association, so now I'm trying to do it manually with callbacks. The problem is I heard that after_save doesnt work on delete. In general I want to make sure I'm doing this right. Tags has many resources, and resources has many tags. I need to ultimately find out how many resources each tag has (i dont care about how many tags each resource has) resource.rb `after_save :cache_resource_count_on_tags` This is still resource.rb. i know its wrong but I dont know what goes in this method def cache_resource_count_on_tags tags.each {|t| tag.update_attribute(:posts_count, t.posts.size)} end my migration: class CreateTags < ActiveRecord::Migration def change create_table :tags do |t| t.string :name t.integer :resources_count, :default => 0 t.timestamps end end end
0
[ 2, 16522, 1, 24416, 29, 63, 1, 14842, 800, 3726, 3726, 31, 216, 70, 37, 109, 89, 9868, 30, 16522, 1, 24416, 2973, 44, 677, 27, 21, 63, 1, 14842, 607, 15, 86, 130, 31, 22, 79, 749, 20, 107, 32, 23671, 29, 645, 1958, 18, 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...
Databound Value in href javascript link === I've trawled the net looking for the syntax to get this working and i'm hoping this is a quick fix else i'll go mad. Basically I have a nested repeater and the button below hides another nested repeater. ((location_details)((RepeaterItem)Container.Parent.Parent).DataItem).tbl_location.location_id evaluates perfectly well (3824 in the case i'm testing), but when I try to pass it so that its a string parameter for the javascript function it fails everytime. <asp:Linkbutton ID="lb_showhide_oloc_gnotes" runat="server" Text="Expand/Close" href='javascript:sltoggle('" + <%# ((location_details)((RepeaterItem)Container.Parent.Parent).DataItem).tbl_location.location_id %> +" '); return false;' /> Any ideas what i'm missing (I know the above syntax is wrong I must have changed it 100 times already but you get the idea). thanks!
0
[ 2, 1054, 7410, 1923, 19, 746, 14057, 8247, 8741, 3508, 800, 3726, 3726, 31, 22, 195, 13, 38, 12404, 1294, 14, 4275, 699, 26, 14, 22649, 20, 164, 48, 638, 17, 31, 22, 79, 3935, 48, 25, 21, 2231, 6098, 962, 31, 22, 211, 162, 207...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
load clr library with native dependencies === I'm scripting IronPython and trying to load a library I wrote that uses CLI/C++ to interop with native C++. Is there a way to get IronPython to load the CLR library and find the appropriate native libraries given that I can't directly add references to non-CLR libraries?
0
[ 2, 6305, 10842, 139, 1248, 29, 1275, 29411, 800, 3726, 3726, 31, 22, 79, 3884, 68, 1751, 6448, 11570, 17, 749, 20, 6305, 21, 1248, 31, 738, 30, 2027, 19391, 118, 150, 20512, 20, 1480, 2594, 29, 1275, 272, 20512, 9, 25, 80, 21, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Is there a way to automatically map a view model object to a javascript object? === This question is similar, but with no conclusion and a self accepted answer of "no": http://stackoverflow.com/q/8028664/1026459 This answer by Darin is a very good example of mapping an object to Json, although I am not sure if it works with complex models: http://stackoverflow.com/a/9007578/1026459 Here is an example of what I was looking at. Given this setup: Viewmodel: public class Avm { public int id { get; set; } public string name { get; set; } public Foo Foo { get; set; } } public class Foo { public int id { get; set; } public string description { get; set; } public List<Bar> Bars { get; set; } } public class Bar { public int id { get; set; } public string metal { get; set; } } **Is there a possible way to define this object model**: javascript object model: <script> var Avm = {}; Avm.id = @(Model.id); Avm.name = "@(Model.name)"; Avm.Foo = {}; Avm.Foo.id = @(Model.Foo.id); Avm.Foo.description = "@(Model.Foo.description)"; Avm.Foo.Bars = []; var Bar = function(){ return { id : var id, metal : var metal; }; } var Bar0 = new Bar(); Bar0.id = @(Model.Foo.Bars[0].id); Bar0.metal = "@(Model.Foo.Bars[0].metal)"; Avm.Foo.Bars.push(Bar0); //and so on for each Bar. </script> **Through a more precise method** than just typing it all out by hand? Or, perhaps through some sort of reflection in a helper so that it would become <script> @Html.GenerateJsObjectModel(Model) <script> Which would call a helper method public static void GenerateJsObjectModel( this HtmlHelper html, dynamic model) { html.ViewContext.Writer.Write("var Avm = {};"); html.ViewContext.Writer.Write("Avm.id = " + model.id + ");"); //etc. (except obviously more generic instead of specific) } Does this already exist in the framework? Would using a serialization process like JSON be superior here and if so what type of hook would be used to tie JSON in for this scenario? What is the best practice approach for creating a complex model in javascript based on a viewmodel.
0
[ 2, 25, 80, 21, 161, 20, 7499, 2942, 21, 1418, 1061, 3095, 20, 21, 8247, 8741, 3095, 60, 800, 3726, 3726, 48, 1301, 25, 835, 15, 47, 29, 90, 6099, 17, 21, 1119, 2217, 1623, 16, 13, 7, 251, 7, 45, 7775, 6903, 25325, 2549, 9990, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
MessageUI framework issue for UITextField contents are not displayed === I've included messageUI framework in my app for sending mail.It contains five UITextField where the values entered by user should be displayed in mail body. Here is my code if ([MFMailComposeViewController canSendMail]) { MFMailComposeViewController *mailer = [[MFMailComposeViewController alloc] init]; mailer.mailComposeDelegate = self; [mailer setSubject:[NSString stringWithFormat:@"Appointment From Mr/Mrs. %@",text1.text]]; NSArray *toRecipients = [NSArray arrayWithObjects:@"info@xxx.com", nil]; [mailer setToRecipients:toRecipients]; NSString *emailBody =[NSString stringWithFormat:@"Name :%@\nDate: %@\nPreferred Time Slot: %@\nE-Mail:%@\nSpecific Requests:",text1.text,text2.text,text3.text,text4.text,text5.text]; [mailer setMessageBody:emailBody isHTML:NO]; [self presentModalViewController:mailer animated:YES]; [mailer release]; } The issue i'm facing is that all the four text field values are displayed only the fifth text field values are not displayed..Any idea?...am i missing anything?...
0
[ 2, 2802, 5661, 6596, 1513, 26, 13, 5661, 11969, 1109, 8478, 50, 52, 6115, 800, 3726, 3726, 31, 22, 195, 506, 2802, 5661, 6596, 19, 51, 4865, 26, 4907, 4216, 9, 242, 1588, 355, 13, 5661, 11969, 1109, 113, 14, 4070, 1297, 34, 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...
google voice recognition source code === as google said new android "jelly bean" will contain voice recognition engine able to work offline. As new android source code have been opened I tried to look at and find source for voice recognition engine but without success. So my question: is voice recognition engine source code a part of android 4.1.1 source code? Or it's something like separate app? Thanks in advance and sorry for my English.
0
[ 2, 8144, 430, 3514, 1267, 1797, 800, 3726, 3726, 28, 8144, 87, 78, 13005, 13, 7, 15236, 102, 15322, 7, 129, 3717, 430, 3514, 1406, 777, 20, 170, 168, 1143, 9, 28, 78, 13005, 1267, 1797, 57, 74, 520, 31, 794, 20, 361, 35, 17, 4...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
get an integer from a webservice using jquery.ajax === Every time I use a **success** function of jQuery.ajax I get the following result : <?xml version="1.0" encoding="utf-8"?> <int xmlns="http://tempuri.org/">-105</int> No matter what dataType I set (json, html, xml) - that's the returned data. How can I escape the integer (-105 in this case)? P.S. maybe I have to change somethig in my asp.net c# web method: [WebMethod] [ScriptMethod(UseHttpGet = true, ResponseFormat = ResponseFormat.Json)] public int CheckRegistrationFree(string phone)
0
[ 2, 164, 40, 13820, 37, 21, 2741, 11449, 568, 487, 8190, 93, 9, 6881, 7522, 800, 3726, 3726, 352, 85, 31, 275, 21, 13, 1409, 29245, 1409, 1990, 16, 487, 8190, 93, 9, 6881, 7522, 31, 164, 14, 249, 829, 13, 45, 13, 1, 60, 396, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Turbo C++ (not visual)(Postfix and prefix operators) === When I run this program I get output as 2 #include<iostream.h> #include<conio.h> void main(){ clrscr(); int a = 10; int c = a-- - --a; cout<<c; getch(); } ... but when I just modify it to #include<iostream.h> #include<conio.h> void main(){ clrscr(); int a = 10,c; c = a-- - --a; cout<<c; getch(); } ... I get output 0. WHY? In java both the of them gave output as 2. Whats wrong with C++? Explain :(
0
[ 2, 12036, 272, 20512, 13, 5, 1270, 3458, 6, 5, 6962, 18594, 17, 14315, 9475, 6, 800, 3726, 3726, 76, 31, 485, 48, 625, 31, 164, 5196, 28, 172, 6926, 22640, 1, 1963, 11260, 9, 252, 1, 6926, 22640, 1, 1126, 1963, 9, 252, 1, 1136...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Error while creating iOS static library === I am creating a static library to track events and page views. I have used UINotification services such as appDidEnterBackground/Forground and Terminate to track and process the evnts and batch process them.. But error is being thrown in these lines.. Can any1 help with this pls.. Any help is appreciated.. Thanks in advance
1
[ 2, 7019, 133, 2936, 13, 7760, 12038, 1248, 800, 3726, 3726, 31, 589, 2936, 21, 12038, 1248, 20, 792, 963, 17, 2478, 4146, 9, 31, 57, 147, 13, 5661, 1270, 4634, 687, 145, 28, 4865, 3052, 13679, 1958, 8810, 118, 1106, 8810, 17, 1795...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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's the difference between a django package and a python library? === I'm new to django and I've been browsing around the djangopackages site. I'm wondering what is the difference between those "django" packages, and python libraries that are not django packages. So for example sendgrid has a django package and also a few regular python libraries. If I want to use the sendgrid wrapper from a django app, what benefits do i get by using the django package rather than the other python libraries that are available and more frequently maintained?
0
[ 2, 98, 22, 18, 14, 2841, 128, 21, 3857, 14541, 6030, 17, 21, 20059, 1248, 60, 800, 3726, 3726, 31, 22, 79, 78, 20, 3857, 14541, 17, 31, 22, 195, 74, 10175, 68, 140, 14, 3857, 14541, 8573, 14465, 689, 9, 31, 22, 79, 5712, 98, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
emberjs childs nested list === I try to create e nested list into an object "person with childs", but the childs are shared width all parents , this is a link http://jsfiddle.net/Lz7CD/5/. thanks
0
[ 2, 13, 19603, 728, 18, 850, 18, 5618, 69, 968, 800, 3726, 3726, 31, 1131, 20, 1600, 13, 62, 5618, 69, 968, 77, 40, 3095, 13, 7, 7276, 29, 850, 18, 7, 15, 47, 14, 850, 18, 50, 2592, 9456, 65, 1144, 13, 15, 48, 25, 21, 3508,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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: setContentView() == getViewInflate().inflate()? === I try my hardest to develop a clever way to clean out piles of `Blah blah = (Blah) this.findViewById(R.id.blah)` that otherwise pollute the field and the onCreate() method of my little Activity, and to do so, I feel I should not use setContentView() but getViewInflate().inflate() for every View defined in XMLs. Is `Activity.setContentView()` is sorta a syntax sugar and it's virtually repeating `getViewInflate().inflate()` for every View on XML? I read something saying as if they were the same. If I can get an answer by looking into the code, please tell so. I checked Activity.class, but only comments were found.
0
[ 2, 13005, 45, 309, 25424, 4725, 5, 6, 800, 3726, 164, 4725, 108, 13830, 62, 5, 6, 9, 108, 13830, 62, 5, 6, 60, 800, 3726, 3726, 31, 1131, 51, 20766, 20, 2803, 21, 11994, 161, 20, 2745, 70, 6551, 18, 16, 13, 1, 220, 9396, 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, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How to test a controller which updates what was posted to it === This seems really simple, but I can't seem to get it to work. I want to unit test my controller's assign action. It takes a IEnumerable(Of Integer) which represent the ID's of all the objects to assign. Here's the code I've written, I'm getting an error on the Do statement (I copied the code from Ayende's blog here http://ayende.com/blog/3397/rhino-mocks-3-5-a-feature-to-be-proud-of-seamless-do). <Test()> _ Public Sub Assign_Post_Should_Assign_All_Audits_Provided() Dim auditsToAssign As IEnumerable(Of HvacAudit) = HvacAuditsGenerator.GenerateAudits() _ .Unassigned() Dim auditIDs As IEnumerable(Of Integer) = auditsToAssign.Select(Function(audit, index) audit.HvacAuditID) Dim hvacAuditRepo As IHvacAuditRepository = MockRepository.GenerateMock(Of IHvacAuditRepository)() hvacAuditRepo.Stub(Sub(repo) repo.GetAuditByID(1)) _ .Do(Function(invocation) invocation.ReturnValue = auditsToAssign.Single(Function(audit) audit.HvacAuditID = invocation.Arguments(0))) Dim controller As New HvacAuditController(hvacAuditRepo) Dim r As ViewResult = controller.Assign(auditIDs).AssertViewRendered() r.AssertAssignedAuditCount(auditsToAssign.Count) auditsToAssign.AssertAreAssigned() hvacAuditRepo.AssertWasCalled(Sub(h) h.SaveChanges()) End Sub
0
[ 2, 184, 20, 1289, 21, 9919, 56, 16779, 98, 23, 6054, 20, 32, 800, 3726, 3726, 48, 2206, 510, 1935, 15, 47, 31, 92, 22, 38, 2260, 20, 164, 32, 20, 170, 9, 31, 259, 20, 1237, 1289, 51, 9919, 22, 18, 13952, 1028, 9, 32, 1384, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
WPF C# .NET Noob requesting some advice (Using Visual Studio 2012 RC) === I've been mainly working with windows forms, but would like to use WPF instead. Generally I like to manage my applications with a Manager.cs file. I will set the manager to be the entry point and it will load for example my main window. From what I've read the Main() entry point is automatically generated when WPF is run. I've tried changing the XAML file to run my Manager.cs file, but it complains when I do so. I'm a complete noob with WPF, anyone got any suggestions for how to keep everything encapsulated in a Manager.cs file and have that run at startup ? Cheers.
0
[ 2, 619, 7721, 272, 5910, 13, 9, 2328, 90, 4995, 20033, 109, 4978, 13, 5, 12655, 3458, 1120, 563, 16462, 6, 800, 3726, 3726, 31, 22, 195, 74, 2011, 638, 29, 1936, 1997, 15, 47, 83, 101, 20, 275, 619, 7721, 700, 9, 1469, 31, 101...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Linux Asynch IO - difference between aio.h and libaio.h === I have started looking at a new paradigm I didn't know called asynch IO in Linux. My goal is to use async IO targeting sockets to write high-performance efficient servers. The reason is that my application is IO-bound. While searching for more information I came across the following 2 introductions. 1. [Posix AIO][1] 2. [Linux AIO interface][2] My questions are the following: Why having 2 different set of API and what different probelem they address (if they do)? The POSIX AIO tutorial pays more attention to socket so it is my first preference, but would you suggest also the second one? Regards AFG [1]: http://www.ibm.com/developerworks/linux/library/l-async/ "Posix AIO" [2]: http://code.google.com/p/kernel/wiki/AIOUserGuide
0
[ 2, 13024, 28, 93, 14976, 13, 1963, 13, 8, 2841, 128, 21, 1963, 9, 252, 17, 2093, 10872, 111, 9, 252, 800, 3726, 3726, 31, 57, 373, 699, 35, 21, 78, 20234, 31, 223, 22, 38, 143, 227, 28, 93, 14976, 13, 1963, 19, 13024, 9, 51,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
When does the compiler need access to a library? === Lets say I have 3 projects: - Project Program -> compiles into an executable - References Audio, Tweakbar - Additional Dependencies: nothing - Additional Library Dependencies: nothing - Project Audio - wrapper around fmod, compiles into .lib - Additional Dependencies: fmodex_vc.lib - Additional Library Dependencies: $(SolutionDir)\libs\fmod\lib - Project TweakBar - wrapper around AntTweakBar, compiles into .lib - Additional Dependencies: AntTweakBar.lib - Additional Library Dependencies: $(SolutionDir)libs\AntTweakBar\lib Now, the issue is that I am getting the following compile error: fatal error LNK1104: cannot open file 'AntTweakBar.lib' This error can be resolved by placing the path to that lib file in the project settings of "Program" What I want to know is why I need to have the path to this lib there? fmod works perfectly fine without such a path.
0
[ 2, 76, 630, 14, 21486, 376, 1381, 20, 21, 1248, 60, 800, 3726, 3726, 6884, 395, 31, 57, 203, 2314, 45, 13, 8, 669, 625, 13, 8, 1, 26561, 18, 77, 40, 1396, 17194, 5924, 13, 8, 7231, 4023, 15, 28769, 1850, 13, 8, 1351, 29411, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
obtaining different behaviours testing web pages on android emulator and real device === I am developing a web site that is to be seen on a samsung galaxy notes. im using asp.net and iscroll mainly. I do not own a galaxy notes, but a partner im working with at distance have one, and he describes me the results on the galaxy notes. I installed android 2.3 on my virtualbox, which is supposed to be the same version as the galaxy notes my partner is using, so i can see the results myself, the weird stuff is that i see different display results from the published website that the ones that my partner sees in the real galaxy notes device. is this a drawback to be expected from testing on a virtual device, or i missing something?
0
[ 2, 12114, 421, 7727, 18, 4431, 2741, 4434, 27, 13005, 3579, 14868, 17, 683, 3646, 800, 3726, 3726, 31, 589, 3561, 21, 2741, 689, 30, 25, 20, 44, 541, 27, 21, 22981, 9358, 2434, 9, 797, 568, 28, 306, 9, 2328, 17, 25, 150, 8694, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Best way to write union query when dealing with NULL and Empty String values === I have to write a query that performs a union between two tables with similar data. The results need to be distinct. The problem I have is that some fields that should be the same are not when it comes to empty values. Some are indicated as null, and some have empty string values. My question is, is there a better way to perform the following query? (without fixing the actual data to ensure proper defaults are set, etc) Will using the Case When be a big performance hit? Select When Column1 = '' Then NULL Else Column1 as [Column1], When Column2 = '' Then NULL Else Column2 as [Column2] From TableA UNION ALL Select When Column1 = '' Then NULL Else Column1 as [Column1], When Column2 = '' Then NULL Else Column2 as [Column2] From TableB
0
[ 2, 246, 161, 20, 2757, 667, 25597, 76, 5746, 29, 16203, 17, 2424, 3724, 4070, 800, 3726, 3726, 31, 57, 20, 2757, 21, 25597, 30, 11563, 21, 667, 128, 81, 7484, 29, 835, 1054, 9, 14, 1736, 376, 20, 44, 4421, 9, 14, 1448, 31, 57,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Python matplotlib change default color for values exceeding colorbar range === When filling a grid with color such as when using contourf in pyplot, I need to find a way to change the color that pyplot uses to fill data that exceed the specified range of the colorbar. I wish to have a static colorbar that does not automatically change its range to fit the max/min of the data, so having occasional extreme values that exceed its bounds is inevitable, and colors need to be specified for such values. The default color for values exceeding the bounds of the colorbar is white, which can glaringly clash with the surrounding data if the colormap does not have white as its end colors. Example image link below (sorry can't post it directly yet) - notice the white fill when values exceed the negative range of the colorbar: http://oi45.tinypic.com/2vimbmg.jpg I believe there is a way to specify which color to use at each bound if they are exceeded by using rcParams, but I have not been able to find information on this anywhere. Any help would be appreciated.
0
[ 2, 20059, 4277, 13221, 38, 8326, 753, 12838, 1665, 26, 4070, 15491, 1665, 1850, 978, 800, 3726, 3726, 76, 7702, 21, 7354, 29, 1665, 145, 28, 76, 568, 23272, 410, 19, 7103, 13221, 38, 15, 31, 376, 20, 477, 21, 161, 20, 753, 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...
NetBeans 7.1 - unable change to UI language === I installed NetBeans 7.1 and can't change UI language. I didn't find any option for it. Any suggestions?
0
[ 2, 4275, 863, 5950, 453, 9, 165, 13, 8, 2343, 753, 20, 13, 5661, 816, 800, 3726, 3726, 31, 4066, 4275, 863, 5950, 453, 9, 165, 17, 92, 22, 38, 753, 13, 5661, 816, 9, 31, 223, 22, 38, 477, 186, 4255, 26, 32, 9, 186, 18389, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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...
Chart Controls with ASP.NET === I am trying to use Charts from Visual studio 2010. Here is the code i am using on page load in .aspx.vb file enter code here Dim o_cmd As SqlCommand Dim o_reader As SqlDataReader Dim ds As New Data.DataSet Dim myCommand As SqlDataAdapter o_Con = New SqlConnection(Gbl.DataS) o_Con.Open() S_Sql = "SELECT Exam, ResultGrade FROM RegAppear WHERE (UID=" & Val(Session("UID")) & ")" o_cmd = New SqlCommand(S_Sql, o_Con) o_reader = o_cmd.ExecuteReader Chart1.Series("Default").Points.DataBindXY(o_reader, "Exam", o_reader, "ResultGrade") o_reader.Close() o_Con.Close()`enter code here` Here is the code from aspx file <asp:chart id="Chart1" runat="server" BackColor="#D3DFF0" BorderColor="26, 59, 105" Palette="BrightPastel" BorderlineDashStyle="Solid" BackSecondaryColor="White" BackGradientStyle="TopBottom" BorderWidth="2" Width="600px" RightToLeft="Yes" > <titles> <asp:Title ShadowColor="32, 0, 0, 0" Font="Trebuchet MS, 14.25pt, style=Bold" ShadowOffset="3" Text="Performance in Different Subjects" ForeColor="26, 59, 105"> </asp:Title> </titles> <legends> <asp:Legend Enabled="False" IsTextAutoFit="False" Name="Default" BackColor="Transparent" Font="Trebuchet MS, 8.25pt, style=Bold"></asp:Legend> </legends> <borderskin SkinStyle="Emboss"></borderskin> <series> <asp:Series IsValueShownAsLabel="True" ChartArea="ChartArea1" Name="Default" CustomProperties="LabelStyle=Bottom" BorderColor="180, 26, 59, 105" LabelFormat="#"></asp:Series> </series> <chartareas> <asp:ChartArea Name="ChartArea1" BorderColor="64, 64, 64, 64" BorderDashStyle="Solid" BackSecondaryColor="White" BackColor="64, 165, 191, 228" ShadowColor="Transparent" BackGradientStyle="TopBottom"> <axisy2 Enabled="False"></axisy2> <axisx2 Enabled="False"></axisx2> <area3dstyle Rotation="10" Perspective="10" Inclination="15" IsRightAngleAxes="False" WallWidth="0" IsClustered="False" /> <axisy LineColor="64, 64, 64, 64" IsLabelAutoFit="False" ArrowStyle="Triangle" LabelAutoFitStyle="None"> <MajorGrid LineColor="64, 64, 64, 64" /> </axisy> <axisx LineColor="64, 64, 64, 64" IsLabelAutoFit="True" ArrowStyle="Triangle" IsReversed="False" TextOrientation="Auto" LabelAutoFitStyle="LabelsAngleStep90" IsInterlaced="True" LogarithmBase="10"> <MajorGrid LineColor="64, 64, 64, 64" /> </axisx> </asp:ChartArea> </chartareas> </asp:chart> Here is the results are ![enter image description here][1] [1]: http://i.stack.imgur.com/QnRNU.png Problem is on the X axis where only alternative name of the exams are shown . Here is the list of exams i see when i query to the database but as seen in the images alternative names are shown in graph. COMED K MOCK- 1 2012 AIIMS Nov-2009 AIIMS Nov-2007 AIIMS May-2006 APPG- 2008 APPG- 2009 2012-13- Aimmds- Periodontics-1 2012-13- Aimmds- Microbiology-2 2012-13- Aimmds- Microbiology-1 Do we have a way to make sure all the name of exams are shown in the x axis ? C33- AimMDS2012-AIIMS Mock N2 2012-13- Aimmds- Gen Histo And embryology
0
[ 2, 1795, 8671, 29, 28, 306, 9, 2328, 800, 3726, 3726, 31, 589, 749, 20, 275, 5158, 37, 3458, 1120, 498, 9, 235, 25, 14, 1797, 31, 589, 568, 27, 2478, 6305, 19, 13, 9, 472, 306, 396, 9, 20468, 3893, 2830, 1797, 235, 5937, 635, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Stop notification sound when pressing volume button === I use the attached code for setting an alarm. This works fine, except for one thing. If the phone is turned off and the notification starts, you can't stop it by pressing the volume button like you can by your alarm clock. Does anyone know how this is handled or where I can find this? Thank you very much! public class OneShotAlarm extends BroadcastReceiver { private static final int NOTIFICATION_ID = 0; @Override public void onReceive(Context context, Intent intent) { NotificationManager manager = (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE); Notification notification = new Notification(R.drawable.icon, "bla", System.currentTimeMillis()); PendingIntent contentIntent = PendingIntent.getActivity(context, 0, new Intent(context, Personal.class), 0); notification.setLatestEventInfo(context, "bla", "blabla", contentIntent); notification.flags = Notification.FLAG_ONLY_ALERT_ONCE; notification.flags = Notification.FLAG_AUTO_CANCEL; notification.sound = (Uri) intent.getParcelableExtra("notificationTone"); if (intent.getBooleanExtra("vibrationEnabled", true)){ notification.vibrate = (long[]) intent.getExtras().get("vibrationPatern"); } manager.notify(NOTIFICATION_ID, notification); } }
0
[ 2, 747, 52, 4634, 646, 76, 7196, 2310, 5167, 800, 3726, 3726, 31, 275, 14, 3638, 1797, 26, 2697, 40, 6490, 9, 48, 693, 1123, 15, 1613, 26, 53, 584, 9, 100, 14, 1132, 25, 412, 168, 17, 14, 52, 4634, 3244, 15, 42, 92, 22, 38, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Passenger Under Mountain Lion Not Loading Anything === I upgraded to ML this morning, and it seemed to go fairly smoothly but everything to do with Passenger has died. I've stripped it back to ground zero and uninstalled everything but RVM, gone to 1.9.3 as recommended for ML compatibility and reinstalled Passenger with the net result of nothing. As it stands setting up sites directly or with PassengerPrefPane ends up with the site not responding. There's nothing negative in the logs that I can see, my Rails setup is working with `rails s` and Apache is definitely running. Anyone got any pointers I can run with, I'm drawing a blank now.
0
[ 2, 3093, 131, 1286, 6023, 52, 12797, 602, 800, 3726, 3726, 31, 9958, 20, 13, 8184, 48, 959, 15, 17, 32, 890, 20, 162, 6647, 17532, 47, 796, 20, 107, 29, 3093, 63, 440, 9, 31, 22, 195, 10841, 32, 97, 20, 666, 4606, 17, 367, 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...
Opening a Python thread in a new console window === I am trying to make a program that will launch both a view window (console) and a command line. In the view window, it would show **constant** updates, while the command line window would use `raw_input()` to accept commands that affect the view window. I am thinking about using threads for this, but I have no idea how to launch a thread in a new console window. How would I do that?
0
[ 2, 1214, 21, 20059, 9322, 19, 21, 78, 8650, 1463, 800, 3726, 3726, 31, 589, 749, 20, 233, 21, 625, 30, 129, 3394, 156, 21, 1418, 1463, 13, 5, 12124, 6069, 6, 17, 21, 1202, 293, 9, 19, 14, 1418, 1463, 15, 32, 83, 298, 13, 140...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 database should I use to deploy a WPF application? === What database should I use? I am currently under the design phase of a WPF application. I have never deployed an application before and I am not sure what database I should use. I want my application to be deployable on any Window's 7 machine without the need of a special install (i.e. SQL Server). I don't want to be in the deployment phase and find out that I should have used another database. Can I simply run a SQL script on the install to generate all the tables and fields required for the software to properly run? Thanks!
0
[ 2, 98, 6018, 378, 31, 275, 20, 17617, 21, 619, 7721, 3010, 60, 800, 3726, 3726, 98, 6018, 378, 31, 275, 60, 31, 589, 871, 131, 14, 704, 2702, 16, 21, 619, 7721, 3010, 9, 31, 57, 243, 6698, 40, 3010, 115, 17, 31, 589, 52, 562...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Jquery Autocomplete remote datasource === Im trying to use Jquery UI's autocomplete feature to query usernames on my database. So the user enters a username similar to one on my db and the autocomplete is suppossed to guess what they are looking for in a drop down. Unfortunately, I can't get the backend script to return suggestions. <?php sleep( 3 ); // no term passed - just exit early with no response if (empty($_GET['term'])) exit ; $q = strtolower($_GET["term"]); // remove slashes if they were magically added if (get_magic_quotes_gpc()) $q = stripslashes($q); $sql = "SELECT * FROM users"; $r = mysql_query($sql); $items = array(); if ( $r !== false && mysql_num_rows($r) > 0 ) { while ( $a = mysql_fetch_assoc($r) ) { $username = $a['username']; array_push($items, $username); } } $result = array(); foreach ($items as $key=>$value) { if (strpos(strtolower($key), $q) !== false) { array_push($result, array("id"=>$k, "label"=>$key, "value" => strip_tags($key))); } if (count($result) > 11) break; } // json_encode is available in PHP 5.2 and above, or you can install a PECL module in earlier versions echo json_encode($result); /* echo $items; */ ?> The script simply returns an empty array, even when it should return a result. I have no idea what is wrong here..
0
[ 2, 487, 8190, 93, 3108, 15990, 5388, 1054, 12097, 800, 3726, 3726, 797, 749, 20, 275, 487, 8190, 93, 13, 5661, 22, 18, 3108, 15990, 1580, 20, 25597, 4155, 7259, 18, 27, 51, 6018, 9, 86, 14, 4155, 8104, 21, 4155, 7259, 835, 20, 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...
Does Naive Bayesian classifier count distinct times of word occurence? === I like to use Naive Bayes Classifier for classifying text.If I have for example beautiful occurs many times in one text do I count all times or only distinct times of occurence?
0
[ 2, 630, 16288, 899, 160, 806, 718, 16292, 2468, 4421, 436, 16, 833, 3744, 2940, 60, 800, 3726, 3726, 31, 101, 20, 275, 16288, 899, 160, 718, 16292, 26, 25117, 68, 1854, 9, 821, 31, 57, 26, 823, 1632, 3690, 151, 436, 19, 53, 1854...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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...
After save -> render json parameters Rails === I'm really new to Rails, sorry for the freshman question. In my controller I have this: if @picture.valid? @order.pictures << @picture @order.save render json: {pictureForm: render_to_string(partial: 'orders/pictures') } I don't understand what is required in the curly braces after you put `render json:` so I don't know what `pictureForm` references? Its not directly referencing a view because I don't have a view called `pictureForm` so I'm stumped :(
0
[ 2, 75, 2079, 13, 8, 1, 16535, 487, 528, 12905, 2240, 18, 800, 3726, 3726, 31, 22, 79, 510, 78, 20, 2240, 18, 15, 1875, 26, 14, 11297, 1301, 9, 19, 51, 9919, 31, 57, 48, 45, 100, 13, 1, 25602, 9, 18506, 43, 60, 13, 1, 7861,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 a Class for SqlConnection in ASP.NET and then use in your application? === I'm having to select, update, delete, etc. basically everywhere on my web application and every time I'm having to write something like this: con.Open(); cmd = new SqlCommand("update items set item_cost = @cost, item_retail_value = @retail, item_v_style = @v_style, item_v_color = @v_color, item_description = @description, " + "item_date_modify = @date, item_time_modify = @time, item_user_modify = @user where item_style = @style and item_color = @color and item_sec_dimenssion = @sec", con); cmd.Parameters.Add("@style", SqlDbType.VarChar, 15).Value = styl; cmd.Parameters.Add("@color", SqlDbType.VarChar, 3).Value = colr; cmd.Parameters.Add("@sec", SqlDbType.VarChar, 8).Value = sdim; cmd.Parameters.Add("@size", SqlDbType.VarChar, 3).Value = size; cmd.Parameters.Add("@cost", SqlDbType.VarChar, 8).Value = sprice; cmd.Parameters.Add("@retail", SqlDbType.VarChar, 8).Value = sretail; cmd.Parameters.Add("@uom", SqlDbType.VarChar, 3).Value = uom; cmd.Parameters.Add("@sku", SqlDbType.VarChar, 10).Value = sku; cmd.Parameters.Add("@barcode", SqlDbType.VarChar, 20).Value = barcode; cmd.Parameters.Add("@v_style", SqlDbType.VarChar, 100).Value = v_style; cmd.Parameters.Add("@v_color", SqlDbType.VarChar, 20).Value = v_color; cmd.Parameters.Add("@description", SqlDbType.VarChar, 40).Value = description; cmd.Parameters.Add("@date", SqlDbType.VarChar, 20).Value = date; cmd.Parameters.Add("@time", SqlDbType.VarChar, 20).Value = time; cmd.Parameters.Add("@user", SqlDbType.VarChar, 20).Value = user; cmd.ExecuteNonQuery(); cmd.Dispose(); con.Close(); Is there a way to create a Class to create SqlConnection with a SqlCommand for "Select", "Update", "Delete", etc. and just provide the table, the fields, parameters and the criteria so I don't have to write all this code every time. Any help will really appreciate it.
0
[ 2, 2936, 21, 718, 26, 4444, 255, 25996, 872, 19, 28, 306, 9, 2328, 17, 94, 275, 19, 154, 3010, 60, 800, 3726, 3726, 31, 22, 79, 452, 20, 5407, 15, 11100, 15, 27448, 15, 2722, 9, 11374, 6417, 27, 51, 2741, 3010, 17, 352, 85, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Hibernate and Jersey conflicts using Tomcat and Eclipse IDE === In my project i am using both Hibernate & Jersey there is a library conflict with Hibernate,Jersey from the below link i getting like this [http://www.hildeberto.com/2008/05/hibernate-and-jersey-conflict-on.html][1] **Jersey uses the ASM library, which is also used by Hibernate, but on different versions. Hibernate uses version 1.5.3 and Jersey uses 3.5.1. A big difference! We can not just delete the old version and put the new one there because they are architecturally different. Version 1.5.3 has an "attrs" package while 3.5.1 doesn't have it but a "signatures" package. The ASM package is needed by the cglib package, which is part of the Hibernate libraries. If we remove that package, Jersey will work correctly, but Hibernate will stop working. To solve this conflict use cglib-nodep.jar instead of cglib.jar and keep ASM version 3.x with Jersey. cglib-nodep.jar includes some ASM classes demanded by cglib.jar, changing the package name to avoid any class conflict.** but after including the asm-3.1.jar,asm-attrs-2.2.3.jar,asm-commons-3.1.jar,asm-util-3.1.jar,cglib-nodep-2.1_3sources.jar i am getting errors if i place cglib 2.1.3 **java.lang.NoSuchMethodError: org.objectweb.asm.ClassWriter.<init>(Z)V at net.sf.cglib.core.DebuggingClassWriter.<init>(DebuggingClassWriter.java:47) at net.sf.cglib.core.DefaultGeneratorStrategy.getClassWriter(DefaultGeneratorStrategy.java:30)** if i place cglib-nodep-2.1_3-sources.jar **java.lang.ClassNotFoundException: net.sf.cglib.core.KeyFactory at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1701) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1546)** [1]: http://www.hildeberto.com/2008/05/hibernate-and-jersey-conflict-on.html please any one list the jar files need to resolve this issue
0
[ 2, 4148, 2102, 8820, 17, 2134, 10344, 568, 2067, 5782, 17, 11652, 13, 3448, 800, 3726, 3726, 19, 51, 669, 31, 589, 568, 156, 4148, 2102, 8820, 279, 2134, 80, 25, 21, 1248, 2930, 29, 4148, 2102, 8820, 15, 8273, 4228, 37, 14, 1021, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 release UIGraphics content, CGImages and UIImages === Hello my name is Sebastian, I am new here and also relative new in objective-c / xcode and last but not least my english is not the best. I hope I get some help anyway. My problem is I use a UIImagepicker to get images from the library or camera into a Imageview, subview of a scrollview. Than the user can zoom and scroll the image and after this it should be cutted and resized. This part works but the problem is a memory problem. As far as I release one image or content I only get bad_excess because how should I say "everything is linked" with eachother. I am looking for a solution to release the images and get the memory free back. I hope someone has a solution for me, I did a lot of googleling and testing a lot but without any improvement :-( -(void) imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info{ UIImage *userTempImage = [info objectForKey:UIImagePickerControllerOriginalImage ]; cutImageZoomView.bouncesZoom = NO; cutImageZoomView.delegate = self; cutImageZoomView.clipsToBounds = YES; [cutImage initWithImage:userTempImage]; cutImage.autoresizingMask = ( UIViewAutoresizingFlexibleWidth ); [cutImageZoomView addSubview:cutImage]; cutImageZoomView.contentSize = [cutImage frame].size; CGRect scrollViewFrame = cutImageZoomView.frame; CGFloat scaleWidth = scrollViewFrame.size.width / cutImageZoomView.contentSize.width; CGFloat scaleHeight = scrollViewFrame.size.height / cutImageZoomView.contentSize.height; CGFloat maxScale = MAX(scaleWidth, scaleHeight); cutImageZoomView.minimumZoomScale = maxScale; cutImageZoomView.maximumZoomScale = 2.0f; cutImageZoomView.zoomScale = maxScale; cutImageView.hidden=NO; [self.view bringSubviewToFront:cutImageView]; [self dismissModalViewControllerAnimated:YES]; -(IBAction)cutImage{ CGRect visibleRect; float scale = 1.0f/cutImageZoomView.zoomScale; if(cutImage.image.size.width!=CGImageGetWidth(cutImage.image.CGImage)) { CGSize uploadSize=CGSizeMake(cutImage.image.size.width, cutImage.image.size.height); UIGraphicsBeginImageContext(uploadSize); CGContextRef context = UIGraphicsGetCurrentContext(); CGContextRotateCTM (context, M_PI /2); CGContextTranslateCTM(context, 0,-cutImage.image.size.width); CGContextScaleCTM(context, 1, -1); CGContextTranslateCTM(context, 0,-cutImage.image.size.width); CGContextDrawImage(UIGraphicsGetCurrentContext(), CGRectMake(0, 0, cutImage.image.size.height, cutImage.image.size.width), cutImage.image.CGImage); UIImage *imageCopy = UIGraphicsGetImageFromCurrentImageContext(); UIGraphicsEndImageContext(); [cutImage setImage:imageCopy]; NSLog(@"90 degress rotated"); } else{ NSLog(@"image had right orientation"); } visibleRect.origin.x = cutImageZoomView.contentOffset.x * scale; visibleRect.origin.y = cutImageZoomView.contentOffset.y * scale; visibleRect.size.width = cutImageZoomView.bounds.size.width * scale; visibleRect.size.height = cutImageZoomView.bounds.size.height * scale; NSLog(@"%f - %f %fx%f",visibleRect.origin.x,visibleRect.origin.y,visibleRect.size.width,visibleRect.size.height); CGImageRef imageRef = CGImageCreateWithImageInRect([cutImage.image CGImage], visibleRect); UIImage *resizedProfilImage = [UIImage imageWithCGImage:imageRef]; [cutImage setImage:nil]; CGImageRelease(imageRef); CGSize uploadSize=CGSizeMake(640, 920); UIGraphicsBeginImageContext( uploadSize ); [resizedProfilImage drawInRect:CGRectMake(0,0,uploadSize.width,uploadSize.height)]; UIImage* newImage = UIGraphicsGetImageFromCurrentImageContext(); UIGraphicsEndImageContext(); [userProfilImage setImage:newImage]; cutImageView.hidden=YES; [self.view sendSubviewToBack:cutImageView]; Thank you for any help!
0
[ 2, 184, 20, 830, 13, 5661, 12084, 18, 2331, 15, 13, 15123, 22039, 18, 17, 13, 5661, 22039, 18, 800, 3726, 3726, 10975, 51, 204, 25, 5337, 15, 31, 589, 78, 235, 17, 67, 4543, 78, 19, 7038, 8, 150, 13, 118, 993, 9375, 17, 236, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
GWT changing package structure, unable to find gwt.xml === I've developed whole project under GWT in Eclipse Juno. After developing it and testing it (it worked fine) I decided to change a little bit the root package structure. From sk.jakub to sk.jakub.app Nothing serious. I changed all the referencies in my .xml files. But I still obtain following error: Loading modules sk.jakub.Editor1 [ERROR] Unable to find 'sk/jakub/Editor1.gwt.xml' on your classpath; could be a typo, or maybe you forgot to include a classpath entry for source? [ERROR] shell failed in doStartup method The problem evidently is that GWT tries to find the Editor1.gwt.xml under old package structure. The package structure wasn't updated. I thought that I forgot to update the Entry Point Module settings but they are fine. So I don't understand why is this happening. Any suggestions how to resolve this problem ? Thank you very much for your answers :)
0
[ 2, 14094, 38, 4226, 6030, 1411, 15, 2343, 20, 477, 14094, 38, 9, 396, 8184, 800, 3726, 3726, 31, 22, 195, 885, 979, 669, 131, 14094, 38, 19, 11652, 21715, 9, 75, 3561, 32, 17, 4431, 32, 13, 5, 242, 577, 1123, 6, 31, 868, 20, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Printing Bill in ASP.net through thermal print === How can we send bill to thermal printer in asp.net? Is there any free library or code available? I could not found free but there are some expensive available.
0
[ 2, 7312, 1071, 19, 28, 306, 9, 2328, 120, 9486, 4793, 800, 3726, 3726, 184, 92, 95, 2660, 1071, 20, 9486, 12925, 19, 28, 306, 9, 2328, 60, 25, 80, 186, 551, 1248, 54, 1797, 904, 60, 31, 110, 52, 216, 551, 47, 80, 50, 109, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
Suspect wordpress is not setting cookies. === I'm trying to make a simple login form. The wordpress function `is_user_logged_in()` always returns false. I don't want to use any pre-existing themes for wordpress, and I want to simply add wordpress functionality to an existing page. I checked the cookies on my page with the form, and none are being set. The wordpress install is located at: `http://localhost/newgameplus/wordpress/` The testings script is located at: `http://localhost/newgameplus/TEST/scripts/php/testWP.php`
0
[ 2, 7551, 833, 5890, 25, 52, 2697, 19396, 9, 800, 3726, 3726, 31, 22, 79, 749, 20, 233, 21, 1935, 6738, 108, 505, 9, 14, 833, 5890, 1990, 13, 1, 403, 1, 16704, 1, 19287, 1, 108, 5, 6, 1, 550, 4815, 4997, 9, 31, 221, 22, 38,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
jQuery AJAX Header Authorisation === I'm trying to authorise an AJAX query based on [this tutorial][1]. It sets the request headers before send with the appropriate authorisation information by using the Crypto library. The problem I'm having is that headers don't seem to be set on request. Here's my code: beforeSend : function(xhr) { var bytes = Crypto.charenc.Binary.stringToBytes(username + ":" + password); var base64 = Crypto.util.bytesToBase64(bytes); xhr.setRequestHeader("Authorization", "Basic " + base64); }, [1]: http://blog.rassemblr.com/2011/05/jquery-ajax-and-rest-http-basic-authentication-done-deal/
0
[ 2, 487, 8190, 93, 20624, 157, 106, 1314, 4330, 800, 3726, 3726, 31, 22, 79, 749, 20, 1314, 2628, 40, 20624, 25597, 432, 27, 636, 1565, 29724, 500, 2558, 165, 500, 9, 32, 3415, 14, 3772, 157, 445, 115, 2660, 29, 14, 4593, 1314, 4...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Synchronise real-time workshop in matlab for grt target === I am trying to run a real-time simulation in Simulink using Real-time Workshop. The target is grt(I have tried rtwin, but my simulation refuses to compile for it). I need the simulation to run in real-time so that one second in simulation lasts one second of real time. Grt ignores realtime and finishes the simulation in shortest time possible. Is there any way to synchronise it? I have tried http://www.mathworks.com/matlabcentral/fileexchange/3175 but could not get it to work(does not compile). Thank you for any suggestions.
0
[ 2, 13, 16023, 2628, 683, 8, 891, 7873, 19, 4277, 9086, 26, 7711, 38, 2935, 800, 3726, 3726, 31, 589, 749, 20, 485, 21, 683, 8, 891, 10926, 19, 4861, 291, 6258, 568, 683, 8, 891, 7873, 9, 14, 2935, 25, 7711, 38, 5, 49, 57, 79...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Convention: Camel case identifier with iPhone, iPad, etc. in the name === TRiViAL, I know, but is there a convention for the "i" in an iDevice name, as part of a longer identifier, when sticking to the `camelCase` convention? Does Apple have any method names or identifiers as examples of such? `someIPadMethod` vs. `someiPadMethod`
0
[ 2, 3087, 45, 15386, 610, 25570, 29, 21024, 15, 31, 8240, 15, 2722, 9, 19, 14, 204, 800, 3726, 3726, 13, 19712, 15, 31, 143, 15, 47, 25, 80, 21, 3087, 26, 14, 13, 7, 49, 7, 19, 40, 13, 3448, 18507, 204, 15, 28, 141, 16, 21,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Work with the result of onPostExecute and don't execute next instruction before treatment is finished === i have a function in an activity where i check something. I call a webservice in that function (in doInbackground method ) and depending on the result i start another activity. That function is called in the onCreate method of the activity and the problem is that the execution of next instruction continue without waiting the result of my function. Here is the code : public class EditAccountActivity extends Activity { public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.edit_account); save.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { checkConflict(); Log.i("VERIF", "WE GO HERE WITHOUT WAITING THE RESULT"); //i don't want to go here if we start the other activity in checkConflict ... }}} public void checkConflict() { final Intent intent = new Intent(this, ConflictFieldActivity.class); new WSDataAccount() { @Override public void onPostExecute(final ArrayList<ArrayList<String>> result) { if (modifiedTimeOnServer > modifiedTimeLocal && !conflictWithFields(fieldLocalFirstStateMap, fieldServerMap.getAccountFieldMap(), modifiedTimeLocal, modifiedTimeOnServer) .isEmpty()) { Toast.makeText(getApplicationContext(), " EDITION CONFLICT !!!! ", Toast.LENGTH_LONG) .show(); startActivity(intent); } } }.execute(sessionName, accountId, "retrieveModifiedTime"); }} Do you know another way to work with the result returned by "onPostExecute", in order to wait my treatment before executing next instruction
0
[ 2, 170, 29, 14, 829, 16, 27, 6962, 1706, 17194, 591, 17, 221, 22, 38, 15644, 328, 7304, 115, 2202, 25, 842, 800, 3726, 3726, 31, 57, 21, 1990, 19, 40, 2358, 113, 31, 2631, 301, 9, 31, 645, 21, 2741, 11449, 19, 30, 1990, 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...
Can one use Rails-style fixtures with Entity Framework / Visual Studio testing? === One of the things I like about [Rails'][1] and [Django's][2] testing approach is their support of using fixtures to set up a database before each test is run. In the past, I've used strict unit tests in conjunction with a mocked repository to test my code, but I'd love to have something that's as easy to use as the aforementioned testing approaches in order to do integrated testing. I've heard some talk of this type of support with code-first and EF 5, but I don't know if it rises to the level of what Rails and Django provide. Surely there's something comparable out there. Any information would be appreciated! [1]: http://guides.rubyonrails.org/testing.html#the-low-down-on-fixtures [2]: https://docs.djangoproject.com/en/dev/topics/testing/?from=olddocs#fixture-loading
0
[ 2, 92, 53, 275, 2240, 18, 8, 4381, 19914, 29, 9252, 6596, 13, 118, 3458, 1120, 4431, 60, 800, 3726, 3726, 53, 16, 14, 564, 31, 101, 88, 636, 7301, 18, 22, 500, 2558, 165, 500, 17, 636, 14365, 14541, 22, 18, 500, 2558, 135, 500...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
With PHP / sqlite3, how can I add a column if it does not exist in a table? === I'm looking for a way to add a column to a table only if it does not exist yet in a PHP script using sqlite3. It looks like SQL alone cannot help me here, for example with something like ALTER TABLE items ADD COLUMN IF NOT EXISTS new_col (INTEGER); Well, I was thinking about hacks like trying to run a query and, if it fails, conclude the column doesn't exist yet : if ($db->querySingle('SELECT new_col FROM items') === FALSE) { // False means the query failed $db->exec('ALTER TABLE items ADD COLUMN new_col (INTEGER)'); } update_stuff_with_new_column($db); I guess it should work, but what if the query failed for another reason (say, a transaction is running) ? There are a few other solutions I can think of, but they all look the same : "if the query fails, the column probably does not exist, create it". Is there a better way to do it ?
0
[ 2, 29, 13, 26120, 13, 118, 4444, 10601, 240, 15, 184, 92, 31, 3547, 21, 4698, 100, 32, 630, 52, 3182, 19, 21, 859, 60, 800, 3726, 3726, 31, 22, 79, 699, 26, 21, 161, 20, 3547, 21, 4698, 20, 21, 859, 104, 100, 32, 630, 52, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
how to use jquery template with javascript property array variable to show complete data in table format === for example: I have created one javascript property array model with some properties like Name, start, director, year as per below: model = {} model.Name = []; model.Stars = []; model.Director = []; model.Year = []; then i added some data in model using push method for example at runtime Name="DDLJ" Stars="SRK" Director="Yashraj" Year="1998" Name="K3G" Stars="SRK" Director="Karan" Year="2004" Name="KKHH" Stars="SRK" Director="Karan" Year="2000" So i want to show this all info of model array object to html table using jquery template, but I don't know how do it? i tred by using `{{each}} {{/each}}` but it only shows one property data at a time then next like.... {{each Name}} ${{$Value}} {{/each}} {{each stars}} ${{$Value}} {{/each}} Please solve this issue and help me...
0
[ 2, 184, 20, 275, 487, 8190, 93, 22894, 29, 8247, 8741, 1354, 7718, 7612, 20, 298, 1279, 1054, 19, 859, 2595, 800, 3726, 3726, 26, 823, 45, 31, 57, 679, 53, 8247, 8741, 1354, 7718, 1061, 29, 109, 3704, 101, 204, 15, 799, 15, 559,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Implementing common subexpression elimination === I am looking into implementing common subexpression elimination (CSE) for expression graphs corresponding to large mathematical expressions (millions of nodes). What algorithms are suitable for performing this? I was searching the internet for an easy-to-implement algorithm but I could not find anything. If possible the algorithm should have a linear complexity in the number of nodes of the complete expression graph.
0
[ 2, 17333, 757, 972, 28993, 10528, 800, 3726, 3726, 31, 589, 699, 77, 17333, 757, 972, 28993, 10528, 13, 5, 150, 870, 6, 26, 1803, 7210, 18, 7265, 20, 370, 7046, 13832, 13, 5, 14428, 18, 16, 16272, 6, 9, 98, 15935, 50, 6445, 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...
Iphone grid view === i have a grid view, and i want to draw rectangles inside each cell of this grid view, the rectangles here represent an event or reminder, so when i get the reminders and events from native calendar i must filter them to get the events for each day seperately so i can draw them in appropiate cell in grid view , But this approach has bad performance. SO how can i draw these events in grid view with excellent performance? how to avoid the delay generated by filtering events for each day in month?
0
[ 2, 21024, 7354, 1418, 800, 3726, 3726, 31, 57, 21, 7354, 1418, 15, 17, 31, 259, 20, 2003, 27181, 18, 572, 206, 1667, 16, 48, 7354, 1418, 15, 14, 27181, 18, 235, 3501, 40, 807, 54, 14973, 15, 86, 76, 31, 164, 14, 14973, 18, 17,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
SyntaxError: invalid syntax href = 'http://maps.google.com' + href === def download_if_dne(href, filename): if os.path.isfile(filename): # print 'already downloaded:', href return False else: if not href.startswith('http://' href = 'http://maps.google.com' + href print 'Fixed url :', href try: print 'downloading:', href oa = openanything.fetch(href) if oa['status']==200: file = open( filename, 'w' ) file.write( oa['data'] ) file.close() return True except KeyboardInterrupt: raise except: print '\tdownload failed -', sys.exc_info()[0] return False This code is an edit to the software ogmaps. http://code.google.com/p/ogmaps/issues/detail?id=1 Error message: File "ogmaps.py", line 36 href = 'http://maps.google.com' + href ^ SyntaxError: invalid syntax I am not a python person and can't figure out the reason for the error.
0
[ 2, 22649, 29992, 45, 16671, 22649, 746, 14057, 800, 13, 22, 21127, 6903, 15022, 18, 9, 16111, 4875, 9, 960, 22, 2754, 746, 14057, 800, 3726, 3726, 6312, 7121, 1, 821, 1, 43, 556, 5, 252, 14057, 15, 3893, 7259, 6, 45, 100, 13, 75...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Add "follow-mode" status to Emacs modeline === How can I add an indicator to the Emacs modeline to indicate that `follow-mode` is enabled in the current buffer?
0
[ 2, 3547, 13, 7, 19184, 8, 15570, 7, 1782, 20, 13, 62, 6893, 18, 1061, 1149, 800, 3726, 3726, 184, 92, 31, 3547, 40, 13310, 20, 14, 13, 62, 6893, 18, 1061, 1149, 20, 4342, 30, 13, 1, 19184, 8, 15570, 1, 25, 9338, 19, 14, 866,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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...
To find percentage of NoOfComments === Id Answer NoOfComments 18 1 2 19 2 0 20 3 0 21 4 0 22 5 1 I have table as given above.Here the field "NoOfComments" is obtained by following query. (SELECT COUNT(*) FROM HRM_BlogVote WHERE HRM_BlogVote.AnswerId =[HRM_BlogAnswer] .[Id]) AS NoOfComments Now I need to find the percentage value of each answer according to the value in the field NoOfComments. Please help me to solve this.
0
[ 2, 20, 477, 5780, 16, 90, 1041, 960, 6601, 800, 3726, 3726, 4924, 1623, 90, 1041, 960, 6601, 474, 137, 172, 732, 172, 713, 434, 203, 713, 852, 268, 713, 1024, 331, 137, 31, 57, 859, 28, 504, 784, 9, 6836, 14, 575, 13, 7, 251, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Some custom filed of contact can not work on android4.0 === I add an account to account&sync,the xml of ContactsSource is below, it can work normal on android2.3,but on android4.0.3,the "android:icon" and "android:summaryColumn" fields can not work.On contact detail page of addressbook,the connections section shows the icon of the account,not "@drawable/icon_bb" and the summaryColumn shows the account name,not "data2" in xml. <ContactsSource xmlns:android="http://schemas.android.com/apk/res/android"> <ContactsDataKind android:mimeType="vnd.android.cursor.item/vnd.com.android.bb.profile" android:icon="@drawable/icon_bb" android:summaryColumn="data2" android:detailColumn="data3" android:detailSocialSummary="true" /> </ContactsSource>
0
[ 2, 109, 5816, 5263, 16, 2203, 92, 52, 170, 27, 13005, 300, 9, 387, 800, 3726, 3726, 31, 3547, 40, 2176, 20, 2176, 1569, 9507, 150, 15, 124, 23504, 16, 11894, 12097, 25, 1021, 15, 32, 92, 170, 1826, 27, 13005, 135, 9, 240, 15, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How to inherit the parent class in child class in javascript === var f_obj = { fname : 's', setfname : function(x){ this.fname = x ; }; } var l_obj = { lname : 'o', setlname : function(x){ this.lname = x; }; } How to inherit the f_obj in l_obj by that i can access parent method using child object. lobject = new l_obj(); Is the below block of sentence is possible in java script lobject.setfname("stack"); lobject.setlname("overflow");
0
[ 2, 184, 20, 17569, 14, 4766, 718, 19, 850, 718, 19, 8247, 8741, 800, 3726, 3726, 4033, 398, 1, 111, 11741, 800, 13, 1, 398, 7259, 13, 45, 13, 22, 18, 22, 15, 309, 410, 7259, 13, 45, 1990, 5, 396, 6, 1, 48, 9, 410, 7259, 80...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Interaction with closed source software === I am working on a new computer peripheral device. I have got the hardware to software link set up pretty nicely, but now I need to be able to grab data from pre-existing, closed source applications. I have looked around for a possible solution and all I have come up with is to look up the value using CheatEngine. I've found solutions that mention pointers, but I have not been able to figure them out yet. However, this potential solution will be usable only for testing purposes at best, as the memory address of a specific value within the application can change. To explain this more accurately: take for example a video game, and the value in question is the speed of a person in the game. Is there a way to stream the speed value of that entity into another application?
0
[ 2, 7754, 29, 827, 1267, 2306, 800, 3726, 3726, 31, 589, 638, 27, 21, 78, 1428, 17219, 3646, 9, 31, 57, 330, 14, 7610, 20, 2306, 3508, 309, 71, 1772, 24050, 15, 47, 130, 31, 376, 20, 44, 777, 20, 4931, 1054, 37, 782, 8, 21341, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Repeating a SELECT Statement === This `SELECT` statement is working just fine but I'd like to be able to repeat it to further refine the search. SELECT id1 FROM table1 WHERE id2 IN (SELECT id FROM table2 WHERE name="country" AND value="Mexico") For instance, if I wanted to find only locations in Mexico that had 'Beaches' which would be: name="features" AND value="Beaches" ...how would I go about paring the results down further with my `SELECT` statement?
0
[ 2, 17389, 21, 5407, 3331, 800, 3726, 3726, 48, 13, 1, 18, 16964, 1, 3331, 25, 638, 114, 1123, 47, 31, 22, 43, 101, 20, 44, 777, 20, 6830, 32, 20, 653, 302, 7509, 14, 2122, 9, 5407, 4924, 165, 37, 859, 165, 113, 4924, 135, 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...
Why isn't my List inside an object contained within another list getting back to the Controller? === I'm sure that this has been answered at some point somewhere on SO, but I haven't been able to find it after over an hour of looking. I'm using C#, MVC3, and AJAX/jQuery. I have a custom object called FormulaModel that has a few properties and a List of Variables. Inside that List of Variables is a Category and a List of OptionsPairs. Inside that List of OptionPairs is a OptionPair consisting of a Name and a Value. I have a partial view to show the Formula, and an EditorTemplate for the Variable and OptionPair. Everything displays as expected, with textboxes for the OptionPairs' Values. However, upon submitting the form that wraps the partial view, I am not getting the list of OptionPairs inside the Variable. FormCollection shows that the values are there in what looks to be the correct format, but the Model does not contain the list of OptionPairs. What am I doing wrong? Am I overlooking something stupid, or trying to do something more complex than regular databinding can handle? Your assistance is greatly appreciated! I'll snip out some standard stuff for sake of brevity. --- Formula.cs --- public int formulaId { get; set; } public string name { get; set; } public string formulaCypher { get; set; } public System.DateTime dateCreated { get; set; } public bool isActive { get; set; } --- FormulaVariable.cs --- [Serializable] public class FormulaVariable { public string Category { get; set; } public List<OptionPair> Options; } --- OptionPair.cs --- [Serializable] public class OptionPair { public string OptionName { get; set; } public int Value { get; set; } } --- FormulaModel.cs --- private ScoringFormula _formula; public List<FormulaVariable> Variables { get; set; } public CreditScoringFormula Formula { get { return _formula; } set { _formula = value; } } public void DecodeFormula() { this.VariableList = this.DecodeFormula(this._formula.formulaCypher); } public void EncodeFormula() { _formula.formulaCypher = EncodeFormula(this.VariableList); } --- EditFormula.cshtml --- @model Models.FormulaModel @using (Ajax.BeginForm("SaveFormula", "Management", new { area = "Admin" }, null, new { id = "frmManageFormula" })) { @Html.HiddenFor(x => x.Formula.dateCreated) @Html.HiddenFor(x => x.Formula.dateEdited) @Html.HiddenFor(x => x.Formula.dateEnacted) @Html.HiddenFor(x => x.Formula.dateRetired) @Html.HiddenFor(x => x.Formula.dealerId) @Html.HiddenFor(x => x.Formula.formulaId) @Html.HiddenFor(x => x.Formula.isActive) @Html.HiddenFor(x => x.Formula.name) <table style="border: 0; padding: 2px; border-spacing: 2px;"> <thead> <tr> <th colspan="2"> Formula "@Model.Formula.name" </th> </tr> </thead> <tbody> @Html.EditorFor(x => x.Variables) <tr> <td colspan="2"> <input type="button" id="btnSaveFormula" value="Save" /> </td> </tr> </tbody> </table> } --- FormulaVariable.cshtml --- @model Models.FormulaVariable <tr> <td colspan="2" style="border: 1px solid #000000;"> @Model.Category @Html.HiddenFor(x => x.Category) </td> </tr> @Html.EditorFor(x => x.Options) --- OptionPair.cshtml --- @model Models.OptionPair <tr> <td> @Model.OptionName @Html.HiddenFor(x => x.OptionName) </td> <td> @Html.TextBoxFor(x => x.Value, new { style = "width: 75px;" }) </td> </tr> --- jQuery --- $("#btnSaveFormula").click(function btnSaveFormula_Click(e) { $.ajax({ type: 'POST', url: $("#frmManageFormula").attr("action"), data: $("#frmManageFormula").serialize(), success: function (content) { alert(content); }, error: function (xhr, status) { alert(xhr.responseText); } }); }); --- Controller Method ---- [HttpPost] public ActionResult SaveScoringFormula(ScoringFormulaModel model, FormCollection formFields) { string errorMsg = string.Empty; try { model.EncodeFormula(); errorMsg = model.SaveFormulaCypher(); } catch (Exception ex) { throw ex; } return Json(errorMsg); } I can add screenshots showing proof of an OptionPair's Value being present in the FormCollection, but the Options List having a Count of 0 if requested. Once again, thank you for any assistance you can provide!
0
[ 2, 483, 2532, 22, 38, 51, 968, 572, 40, 3095, 3437, 363, 226, 968, 1017, 97, 20, 14, 9919, 60, 800, 3726, 3726, 31, 22, 79, 562, 30, 48, 63, 74, 3094, 35, 109, 454, 3493, 27, 86, 15, 47, 31, 2933, 22, 38, 74, 777, 20, 477,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Migrating a small web app from normal website to Wordpress website? === I've got a small cost calculator for a website I've built with JQuery. At some point the person decided they wanted a Wordpress website, and I've been having some trouble migrating it to a page. I've been through the WP documentation on adding Javascript but to be honest I'm still a little confused. What I've done so far in migrating the website so far is take apart the default 'twentyeleven' theme and mess with its CSS for the design to match my websites. Otherwise the theme is untouched. I've already sorted out the HTML and CSS for the app i.e it's showing up correctly. Now I just need to get it to work. If I've got these files: jquery.min.js quick-quote-tool.js jquery.rollbar.min.js jquery.mousewheel.js query.easing.1.3.js jquery.cookie.js How on earth would I add them to a specific page and make my app functional again? If you took the time, thank you for helping a noob out.
0
[ 2, 28749, 21, 284, 2741, 4865, 37, 1826, 2271, 20, 833, 5890, 2271, 60, 800, 3726, 3726, 31, 22, 195, 330, 21, 284, 1516, 28539, 26, 21, 2271, 31, 22, 195, 392, 29, 487, 8190, 93, 9, 35, 109, 454, 14, 840, 868, 59, 417, 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...
Handlers with listBox on mobile === Are client and server handlers assigned to a listBox, that work on the desktop, suppose to function on mobile browsers in the same way? I tried out [this example][1] by Serge on the Desktop (worked fine) and on my mobile browser (did not fire). [My own example][2] is the same way, neither the client or server handler executes on the mobile side. [1]: https://script.google.com/macros/s/AKfycbwpo1YtexOD873ioYU0xXnClL-asiBM8UBazfAoRRRaM5gDqga2/exec [2]: https://script.google.com/macros/s/AKfycbwnY60555lBPe0jWdcFWG3DHIz-3ZO98uY7Xz2fh6Sqz2EUVIH6/exec [3]: https://script.google.com/d/1wYZ_Dc1QXoFdwfL8dLFYYmyzTlJBHhT5A4ZiguBH3rN1z7rJoljDZ-Ue/edit
0
[ 2, 24641, 18, 29, 968, 5309, 27, 3241, 800, 3726, 3726, 50, 6819, 17, 8128, 24641, 18, 2467, 20, 21, 968, 5309, 15, 30, 170, 27, 14, 17404, 15, 5787, 20, 1990, 27, 3241, 16495, 18, 19, 14, 205, 161, 60, 31, 794, 70, 636, 1565,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Best tool (db) for statistics system/data analysis === I was searching around for some time and did not find good answer/solution for my problem/situation, thats why figured out to ask you guys. **History** I have statistics system. It is currently MySQL based. There are two different table structures in it. All the time new data gets inserted. Regulary data from those two tables gets aggregated and third and forth gets created (each have data from both source tables). All data queries are made on those aggregated ones. Ofcourse, when I say 'table' i mean bunch of tables of the same structure (to avoid too huge tables, data is split up into multiple tables). Both table structures have some numbers that gets counted and filters (currently 6, but who knows - maybe one day there can be more). So its something like this: 1, 4, 2, 4, A, B, C, D, E, F In data queries it is possible to do something like this: sum up number columns, filter out the ones which have filters `A:{x1,x2,x3}` and `B:{x5,x8}`, group by filter E and give me subset (page) Z. It is being done in MySQL with some in postprocessing on returned resultset. Data amounts are not huge, but enough big to start thinking about some better solutions (~1M-2M rows per month and amounts are picking up). Filters can have a lot of different values. It can be hundred different values for one filter, thousands different values for another in some time period. Data queries are mostly being done on fresh data (month, few month), but it should be possible to query any data period. Question is - are there any better tools to use than current implementation (MySQL with some aggregated tables)? Keep in mind that tools should be free to use and results pretty much close to realtime. Thanks!
0
[ 2, 246, 5607, 13, 5, 9007, 6, 26, 5818, 329, 118, 18768, 2495, 800, 3726, 3726, 31, 23, 5792, 140, 26, 109, 85, 17, 144, 52, 477, 254, 1623, 118, 18, 18687, 3309, 26, 51, 1448, 118, 18, 12866, 857, 15, 30, 18, 483, 5700, 70, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Rails 3: rollback for after_create === I have an enrollment form. When the user enrolls, the app is supposed to save the data in the `enrollments` table and in the `users` table. (I need this separation because the user's profile can change but the data he entered for that particular enrollment has to be archived. So even if later the user changes his last name, in the enrollment form I'll have his initial information.) So I was thinking about saving data in the `enrollments` table then have a after_create call, like this... after_create :save_corresponding_user def save_corresponding_user user = User.new user.full_name = self.user_full_name user.email = self.user_email user.mobile_phone = self.user_mobile_phone user.save end The issue is, what if saving the user fails for any reason. How can I rollback and destroy the just saved data from the `enrollments` table?
0
[ 2, 2240, 18, 2635, 3001, 1958, 26, 75, 1, 6037, 1373, 800, 3726, 3726, 31, 57, 40, 10239, 505, 9, 76, 14, 4155, 19208, 18, 15, 14, 4865, 25, 2293, 20, 2079, 14, 1054, 19, 14, 13, 1, 219, 8694, 6601, 1, 859, 17, 19, 14, 13, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How should I go about modifying this jQuery - draggable code? === I've set up a jsFiddle which illustrates the whole [situation here.](http://jsfiddle.net/watson/Lt9Kb/7/) Everything works as I'd hoped, except that when you drag the red "peg" to one of the green boxes on the right, and then drag another red peg on top of it, I wish it would turn back to red when it reverts back to the box on the left.
0
[ 2, 184, 378, 31, 162, 88, 17579, 68, 48, 487, 8190, 93, 13, 8, 5501, 263, 579, 1797, 60, 800, 3726, 3726, 31, 22, 195, 309, 71, 21, 487, 18, 1707, 12312, 56, 15620, 18, 14, 979, 636, 18, 12866, 857, 235, 9, 500, 5, 21127, 69...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Access query complexity: layered calculations === I'm trying to run some complex calculations (similar to a limit) on data stored in Access. I'm able to perform the calculation by using layered/nested queries, where each expression is based on the result of the last. My problem is that on about the 9th iteration I get a "Query is too complex" error. My understanding is this is because Access is limited in the number of sub-queries that can be performed simultaneously. Is there an alternative to using AS in the SELECT statement that would allow me to perform more iterations in the same query? I've tried to simplify down my SQL to better show what I am doing (ignore the actual calculation being performed in the example). SELECT Tbl_1.VarA, Tbl_1.VarB, (VarA^2*([VarA]+[VarB])/2) AS EQ1, (VarA^2*([VarA]+[EQ1])/2) AS EQ2 FROM Tbl_1 My current work around is to save the last iteration to a table and then run a second query on that value. I feel this is really bad practice though. I've tried, unsuccessfully, to: (1) base a second query on the first (2) replace constant variables with their values (3) nest the equation, i.e. (VarA^2*([VarA]+(VarA^2*([VarA]+[VarB])/2))/2) AS EQ2 I apologize in advance if I'm not referring to something properly, as I'm relatively new.
0
[ 2, 1381, 25597, 12745, 45, 5385, 69, 19186, 800, 3726, 3726, 31, 22, 79, 749, 20, 485, 109, 1502, 19186, 13, 5, 19107, 20, 21, 4496, 6, 27, 1054, 8214, 19, 1381, 9, 31, 22, 79, 777, 20, 2985, 14, 19644, 34, 568, 5385, 69, 118,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Why does an error still show when I specify -ErrorAction SilentlyContinue? === PS C:\Users\ad_ctjares> Stop-Transcript -ErrorAction silentlycontinue Transcription has not been started. Use the start-transcript command to start transcription. Stop-Transcript : An error occurred stopping transcription: The console host is not currently transcribing. At line:1 char:16 + Stop-Transcript <<<< -ErrorAction silentlycontinue + CategoryInfo : InvalidOperation: (:) [Stop-Transcript], PSInvalidOperationException + FullyQualifiedErrorId : InvalidOperation,Microsoft.PowerShell.Commands.StopTranscriptCommand The code says it all.
0
[ 2, 483, 630, 40, 7019, 174, 298, 76, 31, 19077, 13, 8, 29992, 8645, 8555, 13391, 4185, 60, 800, 3726, 3726, 8613, 272, 45, 1, 16704, 18, 1, 1283, 1, 4812, 6300, 160, 1, 747, 8, 17685, 8741, 13, 8, 29992, 8645, 8555, 13391, 4185,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
HTML Extraction from SimpleXML node === **The Scenario** I am using PHP's SimpleXML to parse a blog feed. The most important node in the tree is the content. I would like to trim the fat from the node, namely the styling features added by the blog site. It is all contained within the same node, and the html entities are encoded. FirePHP logging shows that the string is HTML. For example, the content node looks like this: <content type='html'> BLAH BLAH BLAH.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker 6552111825067891333-7815715921198109330?l=cobracabanarecords.blogspot.com' alt='' /&gt;&lt;/div&gt; &lt;a href="http://4.bp.blogspot.com/-RQPMMDLPMqg/T9ePf9jbXFI/ AAAAAAAAAGs/6egu-05Zim4/s1600/blogHeader.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em; "&gt;&lt;img border="0" height="92" src="http://4.bp.blogspot.com/ -RQPMMDLPMqg/T9ePf9jbXFI/AAAAAAAAAGs/6egu-05Zim4/s320/blogHeader.jpg" width="320" /&gt;&lt;/a&gt; &lt;a href="http://website.com"&gt;Homepage!&lt;/a&gt; </content> **My Question** How can I strip out the parts that I want, and leave the bloat? I would like to keep the text, images and links, but don't need blogger's styling syntax or the <div> element with class "blogger-post-footer." Is there a class or function that will identify those particular HTML elements and allow me to strip out the irrelevant elements?
0
[ 2, 13, 15895, 16748, 37, 1935, 396, 8184, 15421, 800, 3726, 3726, 13, 1409, 124, 12705, 1409, 31, 589, 568, 13, 26120, 22, 18, 1935, 396, 8184, 20, 2017, 870, 21, 8146, 4063, 9, 14, 127, 681, 15421, 19, 14, 1541, 25, 14, 2331, 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...
Does CyanogenMod support USB Host API? === Does CyanogenMod support **Android USB Host API** (http://developer.android.com/guide/topics/connectivity/usb/host.html)? I mean the Host API to the programmer, not just the USB host mode.
0
[ 2, 630, 272, 2817, 12396, 13670, 555, 182, 220, 2015, 21, 2159, 60, 800, 3726, 3726, 630, 272, 2817, 12396, 13670, 555, 13, 1409, 290, 18524, 182, 220, 2015, 21, 2159, 1409, 13, 5, 21127, 6903, 26051, 106, 9, 290, 18524, 9, 960, 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...
Page access tokens don't match Facebook's documentation === I'm seeing inconsistencies between Facebook' stated policy regarding the expiration time of Page access tokens, and the expiration time for tokens obtained through my application. According to https://developers.facebook.com/roadmap/offline-access-removal/ regarding the new access token policies effective July 5th: >"When a user grants an app the manage_pages permission, the app is able to obtain page access tokens for pages that the user administers by querying the [User ID]/accounts Graph API endpoint. With the migration enabled, when using a short-lived user access token to query this endpoint, the page access tokens obtained are short-lived as well. >Exchange the short-lived user access token for a long-lived access token using the endpoint and steps explained earlier. By using a long-lived user access token, querying the [User ID]/accounts endpoint will now provide page access tokens that do not expire for pages that a user manages." In my authentication flow, I retrieve a 2 month token along with the `manage_pages` permission (migration is enabled). I then use this token to request Page access tokens via the `[User ID]/accounts` endpoint. The Page access token I'm getting back are shown to expire in 2 months according to https://developers.facebook.com/tools/debug. Facebook's policy seems to state that these tokens should never expire. Can someone help explain what's going on?
0
[ 2, 2478, 1381, 20, 2853, 18, 221, 22, 38, 730, 9090, 22, 18, 13945, 800, 3726, 3726, 31, 22, 79, 2078, 19, 12124, 702, 22851, 128, 9090, 22, 1240, 1486, 3467, 14, 29529, 85, 16, 2478, 1381, 20, 2853, 18, 15, 17, 14, 29529, 85, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Apply hyperlink to Image Asp.net === .displayed1 { position:fixed; top: 275px; right:341px; } <img class="displayed1" src= "Images/NewProjectCohesive02.jpg" alt="" /> How can I add a hyperlink of AddnewPage1.aspx to the image? Is it necessary for the image to be in <form id="form1" runat="server"> tag ?
0
[ 2, 5645, 5443, 6258, 20, 1961, 28, 306, 9, 2328, 800, 3726, 3726, 13, 9, 2906, 11061, 165, 13, 1, 649, 45, 18594, 69, 73, 371, 45, 13, 19316, 306, 396, 73, 193, 45, 24474, 306, 396, 73, 13, 1, 13, 1, 1660, 263, 718, 3726, 7,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
running thread at the same time swing gui is running === I have this class: public class MyClass extends Observable implements Runnable { ... } I have to exceute this thread in background during swing gui running.which could be the best solution? If I don't make a mistake, I can't use `SwingWorker`.right?
0
[ 2, 946, 9322, 35, 14, 205, 85, 5587, 9457, 25, 946, 800, 3726, 3726, 31, 57, 48, 718, 45, 317, 718, 51, 1898, 9073, 5122, 10321, 579, 8713, 18, 485, 103, 579, 13, 1, 13, 9, 9, 9, 13, 1, 31, 57, 20, 1396, 1105, 6567, 48, 93...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Cube transition effect for div === You know like there are some cool slider effects out there that sometimes use cube transition effects. For example, the next image is built up of multiple cubes which fit together at the end of the transition. Well i was wandering... Is there a jQuery plugin of some sort that uses this transition as a div fade in / fade out? Thanks
0
[ 2, 13682, 4513, 1590, 26, 13, 12916, 800, 3726, 3726, 42, 143, 101, 80, 50, 109, 2700, 3295, 106, 2292, 70, 80, 30, 1030, 275, 13682, 4513, 2292, 9, 26, 823, 15, 14, 328, 1961, 25, 392, 71, 16, 1886, 13682, 18, 56, 2742, 429, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Website content analysis tools === I'm working on a project to detect websites which violate certain user agreements for accepting payments (through serve/visa etc). e.g. sites which sell prescription drugs, firearms etc etc. My approach is to selectively crawl the web, categorize the sites into high level categories like drugstore, petstore, handicraft store, file sharing, digital content etc etc. I was wondering what would be the best way to do the ontology/category analysis given the raw content of websites. Is there any tool which uses Hidden Markov Model/KNN or other AI techniques to do such an analysis. Appreciate any help. Thanks, Shaan
0
[ 2, 2271, 2331, 2495, 4672, 800, 3726, 3726, 31, 22, 79, 638, 27, 21, 669, 20, 9092, 13931, 56, 21957, 1200, 4155, 12267, 26, 10894, 11161, 13, 5, 11639, 1884, 118, 3762, 58, 2722, 6, 9, 13, 62, 9, 263, 9, 3259, 56, 3344, 20424, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Calculate time passed variable to use in $.get() === I'm trying to update my database with some information. One of the key pieces of information is how much time has passed since the page first loaded and when the user click a button. My code looks like this: <script> function pauseVideo() { $.get("video_pause.php?pause=" + timePassed + "&videoid=<?php echo $_GET['sessionid']; ?>&sessionid=<?php echo $_GET['videoid']; ?>"); } </script> and <html> <div id="pause" onclick="pauseVideo()">PAUSE</div> </html> My PHP is fine so ignore that. The part I'm having trouble with is the 'timePassed'. I need this to be the amount of time in seconds since the page was first loaded and the person clicks the PAUSE div. I think I need to run a function on click to find the passed time and then use that time variable in the $.get() somehow?
0
[ 2, 18469, 85, 1100, 7612, 20, 275, 19, 5579, 9, 3060, 5, 6, 800, 3726, 3726, 31, 22, 79, 749, 20, 11100, 51, 6018, 29, 109, 676, 9, 53, 16, 14, 1246, 2491, 16, 676, 25, 184, 212, 85, 63, 1100, 179, 14, 2478, 64, 8572, 17, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
layout update fail when it is called in oncreat()method === I have an issue with layout update. I have method like this : public void changeview(){ tabHost.getTabWidget().getChildAt(1) .setVisibility(View.GONE); tabHost.getTabWidget().getChildAt(2) .setVisibility(View.GONE); tabHost.getTabWidget().getChildAt(3) .setVisibility(View.VISIBLE); tabHost.getTabWidget().getChildAt(0) .setVisibility(View.VISIBLE); try{ periodicCheck.setVisibility(View.GONE); periodiCheckText.setVisibility(View.GONE); MessageDelayText.setVisibility(View.GONE); }catch (Exception e) { throw new Error("set visibility failed: "+e); } When I call the method from button 's click listener it works fine, but when I call the method within the oncreate() method of Acitivity class nothing happens. I am just wondering maybe I need to refresh the layout but I am not sure?? I have tried to use invalidate mthod by implementing the following code, but still nothinf happens. ViewGroup vg = (ViewGroup) findViewById (R.id.main); vg.invalidate(); I would appreciate any advice on that. Many thanks in advance
0
[ 2, 9106, 11100, 7476, 76, 32, 25, 227, 19, 27, 14946, 38, 5, 6, 5909, 1807, 43, 800, 3726, 3726, 31, 57, 40, 1513, 29, 9106, 11100, 9, 31, 57, 2109, 101, 48, 13, 45, 317, 11364, 753, 4725, 5, 6, 1, 6523, 11694, 9, 3060, 1578...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Algorithm and Hint for Scientific Calculator === I have a Scientific Calculator project using Java Swing. but, I ended up in wrong calculation. Example: If push button: 1 then + then 2 then * then 3 the answer is 9, not 7. Could you give me a hint, I must use what classes? And how about the algorithm to make it right answer? Thank you
0
[ 2, 9083, 17, 6382, 26, 2272, 28539, 800, 3726, 3726, 31, 57, 21, 2272, 28539, 669, 568, 8247, 5587, 9, 47, 15, 31, 1272, 71, 19, 1389, 19644, 9, 823, 45, 100, 3250, 5167, 45, 137, 94, 2754, 94, 172, 94, 1637, 94, 203, 14, 1623...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
performSelector:withObject:afterDelay: not working on modal view controller === I have a modal view controller that appears, checks a service on the Internet and then dismisses itself when done. The nib contains an activity indicator and a label to inform the user what is going on. When the update is complete, the label changes to "Update Complete" and then dismisses the view controller. However, I want it to delay the dismiss for a couple of seconds to give the user a chance to see the text before it disappears. So I've done this: #pragma mark - AssetLoaderServiceDelegate - (void)assetLoaderServiceDidFinishLoading:(AssetLoaderService *)service { [self.spinner stopAnimating]; self.infoLabel.text = @"Update complete"; [self performSelector:@selector(dismissUpdater) withObject:nil afterDelay:2.0]; } - (void)dismissUpdater { [self dismissModalViewControllerAnimated:YES]; } But for some reason, the selector is never being called. I've tried running it in mode `NSRunLoopCommonModes` too, but that doesn't work either. I must be doing something wrong, but I can't see what...
0
[ 2, 11563, 16964, 248, 45, 1410, 23793, 45, 5162, 546, 4414, 45, 52, 638, 27, 13, 20756, 1418, 9919, 800, 3726, 3726, 31, 57, 21, 13, 20756, 1418, 9919, 30, 1780, 15, 16602, 21, 365, 27, 14, 2620, 17, 94, 14372, 160, 1145, 76, 67...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 data from selected datagridview row and which event? === I have a DataGridView (Selectionmode: FullRowSelect) on a windows form along with some textboxes, so what i want to do is that whenever a user selects a row(click or double_click maybe), the contents of that row must be displayed in the text boxes, i tried out this codes private void dataGridView1_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { MessageBox.Show("CEll Double_Click event calls"); int rowIndex = e.RowIndex; DataGridViewRow row = dataGridView1.Rows[rowIndex]; textBox5.Text = row.Cells[1].Value; } private void dataGridView1_CellClick(object sender, DataGridViewCellEventArgs e) { int rowIndex = e.RowIndex; DataGridViewRow row = dataGridView1.Rows[rowIndex]; textBox5.Text = dataGridView1.Rows[1].Cells[1].Value.ToString();// row.Cells[1].Value; } there are many other textboxes, but the main problem is that none of the event seems to be triggered, what event should i use to do so, or is there some property of datagrid that i might have set wrong? Any help would be appreciated...:(
0
[ 2, 1017, 1054, 37, 1704, 1054, 16375, 4725, 3131, 17, 56, 807, 60, 800, 3726, 3726, 31, 57, 21, 1054, 16375, 4725, 13, 5, 18, 5033, 15570, 45, 503, 5417, 18, 16964, 6, 27, 21, 1936, 505, 303, 29, 109, 1854, 5309, 160, 15, 86, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
A Progressbar with three Information === Hi people iam new in programming objective-c for iOS. I have a big problem with progressbar. Here is my question: I need three Information in my progress bar: number of slides, number of time used, and number of time left. They would be measure in percentage. For example if 50% of presentation time is used and I have presented 60% of my slide then, the bar should look like "bbbbbgyyyy" where "b - blue colour for time used", "g - green colour for slides ahead" and "y - yellow colour for time left". if 50% of time is used and I have only presented 30% of my slide then the bar should look like "bbbppyyyyy" where "b - blue colour for time used", "p - pink colour for slides behind" and "y - yellow colour for time left". Can anyone help me? Big thx
0
[ 2, 21, 3455, 1850, 29, 132, 676, 800, 3726, 3726, 4148, 148, 31, 765, 78, 19, 3143, 7038, 8, 150, 26, 13, 7760, 9, 31, 57, 21, 580, 1448, 29, 3455, 1850, 9, 235, 25, 51, 1301, 45, 31, 376, 132, 676, 19, 51, 3455, 748, 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...
Callback function with arguments using jQuery dialog === I'm trying to call a javascript function with arguments on the click of a button in a dialog. Here is the flow of a simplified version that I can post here: 1) On click of an HTML button, pass a function and the button ID as arguments to a 'confirm' dialog. 2) On click of a 'Yes' in the confirmation dialog, call the passed in function that would just update the ID and value of the HTML button. For some reason, the dialog keeps using the original argument and never gets the updated one. I think the code would do a better job of explaining the issue. Here is the HTML snippet: <script type="text/javascript" src="jquery-1.3.2.js"></script> <script type="text/javascript" src="jquery-ui-1.7.2.custom.js"></script> <div id="confirmDialog"></div> <div id="div_input"> <input type="button" id="1" value="1" onClick="javascript:confirmAction(updateButton, this.id)" /> </div> And here is the javascript snippet: function confirmAction(onSuccessFunction, functionArg) { var message = "Are you sure?"; $('#confirmDialog').html(message); $('#confirmDialog').dialog({ modal: true, autoOpen: false, title: 'Confirm', width: 400, height: 150, buttons: { 'Yes': function() { $(this).dialog('close'); onSuccessFunction(functionArg); }, 'No': function() { $(this).dialog('close'); } } }); $("#confirmDialog").dialog('open'); }; function updateButton(buttonId) { alert(buttonId); var buttonHTML = ''; if(buttonId == '1') { buttonHTML = "<input type='button' id='2' value='2' onClick='javascript:confirmAction(updateButton, this.id)' />"; } else { buttonHTML = "<input type='button' id='1' value='1' onClick='javascript:confirmAction(updateButton, this.id)' />"; } document.getElementById("div_input").innerHTML = buttonHTML; }; confirmAction(...) always calls updateButton(...) with buttonId as '1'. It works fine if I call updateButton(...) directly 'onClick'. Am I missing something here?
0
[ 2, 645, 1958, 1990, 29, 10553, 568, 487, 8190, 93, 28223, 800, 3726, 3726, 31, 22, 79, 749, 20, 645, 21, 8247, 8741, 1990, 29, 10553, 27, 14, 10840, 16, 21, 5167, 19, 21, 28223, 9, 235, 25, 14, 3312, 16, 21, 13, 11268, 615, 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...
Multiple Grails versions on Ubuntu === I have to manage multiple Grails version on Ubuntu, namely 1.3.9 and 2.0.4. I have installed Grails from the PPA, which allows to install multiple versions, but only creates one entry under bin, which points to the most recent version. What is the simplest way to switch between Grails versions? Please note that I am new to Grails, and I would prefer a solution that does not depend on a particular IDE.
0
[ 2, 1886, 489, 7301, 18, 3281, 27, 287, 12968, 2473, 800, 3726, 3726, 31, 57, 20, 4705, 1886, 489, 7301, 18, 615, 27, 287, 12968, 2473, 15, 8525, 137, 9, 240, 9, 518, 17, 172, 9, 387, 9, 300, 9, 31, 57, 4066, 489, 7301, 18, 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...
Validate JSF tags/attributes in Eclipse Indigo === In Eclipse Indigo (for Java EE Developers, JBoss Tools are installed) I created new "Dynamic Web Project", enabled the JSF v 2.0 from Project Facets and added xhtml file whose content is below: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core" xmlns:ui="http://java.sun.com/jsf/facelets"> <h:head></h:head> <body> <h:messages layout="table" /> </body> </html> Now I want to see validation warnings / errors when I change the JSF tag or its attribute to some invalid value like these: Invalid tag `<h:barfoo layout="table" />` Invalid attribute `<h:messages barfoo="table" />` Invalid attribute val `<h:messages layout="barfoo" />` Currently I cannot see any warnings for all 3 ones in Eclipse. How can I validate the page?
0
[ 2, 7394, 1373, 487, 18, 410, 3383, 18, 118, 721, 14755, 18, 19, 11652, 22655, 800, 3726, 3726, 19, 11652, 22655, 13, 5, 1106, 8247, 13, 2851, 10168, 15, 487, 10349, 18, 4672, 50, 4066, 6, 31, 679, 78, 13, 7, 20985, 2741, 669, 7,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Reset frames when rotating orientation === I have an app that has some buttons and a text view and a label. I want to rotate the device and have them redrawn on the screen to fit. I want to do it programatically. Currently I have these methods: -(void)willRotateToInterfaceOrientation: (UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration { [super willRotateToInterfaceOrientation:toInterfaceOrientation duration:duration]; if (toInterfaceOrientation == UIInterfaceOrientationLandscapeRight || toInterfaceOrientation == UIInterfaceOrientationLandscapeLeft) { [self reOrderSideways]; } else { [self reOrderUpDown]; } } -(void)reOrderSideways{ self.viewLabel.frame=CGRectMake(175.0,140.0,130.0,20.0); self.buttonOne.frame=CGRectMake(20.0,20.0,440.0,100.0); self.buttonTwo.frame=CGRectMake(20.0,180.0,440.0,100.0); self.textContent.frame=CGRectMake(20.0, 290.0, 440.0, 100.0); self.theScroller.contentSize = CGSizeMake(480.0, 350.0); } -(void)reOrderUpDown{ self.viewLabel.frame=CGRectMake(95.0,15.0,130.0,20.0); self.buttonOne.frame=CGRectMake(20.0,50.0,280.0,190.0); self.buttonTwo.frame=CGRectMake(20.0,250.0,280.0,190.0); self.textContent.frame=CGRectMake(20.0, 450.0, 280.0, 190.0); self.theScroller.contentSize = CGSizeMake(320.0, 460.0); } It doesn't quite work because when i rotate sideways, the buttons and labels and textview get cutoff the right side. I checked it and it looks like its using the coordinates I gave it but it is still using the portrait frame or bounds. How can i fix this?
0
[ 2, 23422, 12809, 76, 16164, 10245, 800, 3726, 3726, 31, 57, 40, 4865, 30, 63, 109, 12861, 17, 21, 1854, 1418, 17, 21, 1899, 9, 31, 259, 20, 21448, 14, 3646, 17, 57, 105, 302, 19950, 27, 14, 2324, 20, 2742, 9, 31, 259, 20, 107,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Can't make asset precompile before pushing to heroku === I need to make it to make my jQuery working on Heroku. <p>Here is my console: $ rake assets:precompile c:/Ruby192/bin/ruby.exe c:/Ruby192/bin/rake assets:precompile:all RAILS_ENV=production RAILS_GROUPS=assets rake aborted! Access denied for user 'root'@'localhost' (using password: NO) Tasks: TOP => environment (See full trace by running task with --trace) rake aborted! Command failed with status (1): [c:/Ruby192/bin/ruby.exe c:/Ruby192/bin/rak...] Tasks: TOP => assets:precompile (See full trace by running task with --trace) When I try do run: $ assets:precompile sh: assets:precompile: command not found
0
[ 2, 92, 22, 38, 233, 12146, 782, 11103, 3599, 115, 5076, 20, 36, 9266, 800, 3726, 3726, 31, 376, 20, 233, 32, 20, 233, 51, 487, 8190, 93, 638, 27, 36, 9266, 9, 13, 1, 306, 1, 6836, 25, 51, 8650, 45, 5579, 21009, 6223, 45, 351...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 access element in XUL overlay through javascript? === I have loaded a plugin into my XUL overlay, by <vbox style="height:0;"> <html:embed type="application/x-my-plugin" id="my-plugin" style="height:0;"/> </vbox> Now an event triggers when the user loads a new tab and I have a reference to the caller. This is done through javascript, which is attached to the XUL overlay. var caller = myEvent.originalTarget; When I try to do the following, my variable "plugin" is null. What could be the problem and how can I solve the issue? var plugin = caller.getElementById("my-plugin"); plugin.calculateTime();
0
[ 2, 184, 20, 1381, 4520, 19, 993, 1287, 84, 4414, 120, 8247, 8741, 60, 800, 3726, 3726, 31, 57, 8572, 21, 10922, 108, 77, 51, 993, 1287, 84, 4414, 15, 34, 13, 1, 710, 5309, 1034, 3726, 7, 252, 7748, 45, 387, 73, 7, 1, 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...
Set a variable and check equality in one line === I'm creating a maze program to get some more practice in Java. I have a method that moves the player, and it returns a `boolean` value if the move was successful (i.e. it didn't run into a wall). Here is the method in question: public boolean move(Direction direction) { if(currentLocation == (currentLocation = maze.movePlayer(this, direction))) { return false; } else { return true; } } Obviously, this will always return false. I was wondering if there is a way to check if `currentLocation` didn't change (or is equal to the returned value of `maze.movePlayer(...)` and set them equal if they aren't). I don't know if it is possible to do this without calling the method twice or using a local variable. I hope this makes sense!
0
[ 2, 309, 21, 7612, 17, 2631, 10337, 19, 53, 293, 800, 3726, 3726, 31, 22, 79, 2936, 21, 14576, 625, 20, 164, 109, 91, 1345, 19, 8247, 9, 31, 57, 21, 2109, 30, 4927, 14, 517, 15, 17, 32, 4815, 21, 13, 1, 10858, 413, 210, 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...
ArgumentOutOfRangeException when returning to page containing List === I am having a simple list of todo's that's stored in a List<Todo>-object, that's shown through a ListBox through data binding. The items are clickable, and they take you to a details page, where you can also delete the task. Everything works out fine, but when I click the back-button, I get an ArgumentOutOfRangeException and the app crashes. Now, I gather this is because the app thinks the list still has items, but I'm not quite sure how to fix it. The exception is raised on System.Windows.dll - nothing specific. Also, I know the exception is raised after the OnNavigatedTo-event. XAML (just the listbox - somewhat simplified): <ListBox Name="MyActivitiesList" ItemsSource="{Binding MyActivities}" SelectionChanged="ListBox_SelectionChanged"> <ListBox.ItemTemplate> <DataTemplate> <ListBoxItem> <StackPanel Margin="0,0,0,12"> <-- context menu was here, but has been removed --> <TextBlock Text="{Binding Title}" Style="{StaticResource BigHeader}"/> <StackPanel Orientation="Horizontal"> <TextBlock Text="{Binding Category.Name}" Style="{StaticResource SubtleText}"/> <TextBlock Text=" - " Style="{StaticResource SubtleText}"/> <TextBlock Text="{Binding VotesPercentage}" Style="{StaticResource SubtleText}"/> <TextBlock Text="% positive" Style="{StaticResource SubtleText}" /> </StackPanel> </StackPanel> </ListBoxItem> </DataTemplate> </ListBox.ItemTemplate> </ListBox> Code-behind: private MyActivitiesViewModel myActivitiesViewModel; public MyActivitiesView() { InitializeComponent(); } protected override void OnNavigatedTo(System.Windows.Navigation.NavigationEventArgs e) { myActivitiesViewModel = new MyActivitiesViewModel(); this.DataContext = myActivitiesViewModel; base.OnNavigatedTo(e); } protected override void OnNavigatingFrom(System.Windows.Navigation.NavigatingCancelEventArgs e) { MyActivitiesList.SelectedItem = null; base.OnNavigatingFrom(e); } private void ListBox_SelectionChanged(object sender, SelectionChangedEventArgs e) { if (((ListBox)sender).SelectedItem != null) { var idea = ((ListBox)sender).SelectedItem as Idea; ((ListBox)sender).SelectedItem = null; Dispatcher.BeginInvoke(() => NavigationUtility.Navigate(new Uri("/View/IdeaView.xaml", UriKind.Relative), idea)); } } Any ideas? Help would be greatly appreciated!
0
[ 2, 5476, 1320, 1041, 8366, 10066, 872, 76, 2485, 20, 2478, 3503, 968, 800, 3726, 3726, 31, 589, 452, 21, 1935, 968, 16, 20, 537, 22, 18, 30, 22, 18, 8214, 19, 21, 968, 1, 262, 537, 1, 8, 23793, 15, 30, 22, 18, 1721, 120, 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...
Convert php array to quiz format === How can I convert the below array to look like a quiz question format: Array ( [content] => Array ( [@attributes] => Array ( [id] => 20 ) [quest] => <FONT FACE="Arial">If K represents kinetic energy, V velocity and T time and these are chosed as the fundamental units then , the unit of surface tension will be</FONT> [opt1] => <FONT FACE="Arial"><img src="Images/Phys1/XLA840.gif" WIDTH=56 HEIGHT=18 align="absmiddle"></FONT> [opt2] => <FONT FACE="Arial"><img src="Images/Phys1/XLB840.gif" WIDTH=58 HEIGHT=18 align="absmiddle"></FONT> [opt3] => <FONT FACE="Arial"><img src="Images/Phys1/XLC840.gif" WIDTH=62 HEIGHT=18 align="absmiddle"></FONT> [opt4] => <FONT FACE="Arial"><img src="Images/Phys1/XLD840.gif" WIDTH=58 HEIGHT=18 align="absmiddle"></FONT> [ans] => a [ans_desc] => <FONT FACE="Arial"><P><img src="Images/Phys1/XLAD840.gif" WIDTH=157 HEIGHT=22 align="absmiddle"></P> <P><img src="Images/Phys1/XLAD841.gif" WIDTH=312 HEIGHT=44 align="absmiddle"></P> <P><img src="Images/Phys1/XLAD842.gif" WIDTH=160 HEIGHT=44 align="absmiddle"></P> <P><img src="Images/Phys1/XLAD843.gif" WIDTH=74 HEIGHT=22 align="absmiddle"></P> </FONT> ) ) Format Question Option1 Option2 Option3 Option4 <submit button>
1
[ 2, 8406, 13, 26120, 7718, 20, 17667, 2595, 800, 3726, 3726, 184, 92, 31, 8406, 14, 1021, 7718, 20, 361, 101, 21, 17667, 1301, 2595, 45, 7718, 13, 5, 636, 25424, 500, 800, 1, 7718, 13, 5, 636, 1, 721, 14755, 18, 500, 800, 1, 77...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Alphabetizing Results after Order By sort === I am trying to write a query that sorts the results of a table to be broken into 3 sections, and I want each section to be in alphabetical order once complete. Here is the query I wrote: SELECT * FROM (SELECT TOP 100 PERCENT * FROM Hospital WHERE Status = 1 Order By HospitalShortName ) As Result Order BY CASE HospitalType WHEN 'HOS' THEN 1 WHEN 'NH' THEN 2 ELSE 3 END So my intended result would be something like this: - Hospital A - Hospital B - Hospital C - NursingHome A - etc. However, this query returns the list broken into the correct groups but not alphabetical by HospitalShortName. I understand why the above query won't work but I'm lost as to where to go from here. Any help much appreciated.
0
[ 2, 11844, 3335, 1736, 75, 389, 34, 2058, 800, 3726, 3726, 31, 589, 749, 20, 2757, 21, 25597, 30, 14357, 14, 1736, 16, 21, 859, 20, 44, 2023, 77, 203, 4501, 15, 17, 31, 259, 206, 1050, 20, 44, 19, 27169, 389, 382, 1279, 9, 235,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Calling a .bat from a setup.exe file === I am using 7zip to create a software setup package. Everything works just fine except I need to stop and restart a service. I can manipulate the service using the net stop / start commands using a .bat file but I want to have this file called automatically.
0
[ 2, 2555, 21, 13, 9, 4900, 37, 21, 18161, 9, 1706, 62, 3893, 800, 3726, 3726, 31, 589, 568, 453, 2553, 306, 20, 1600, 21, 2306, 18161, 6030, 9, 796, 693, 114, 1123, 1613, 31, 376, 20, 747, 17, 22767, 21, 365, 9, 31, 92, 18468, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Same method in Interface and Abstract class === I came to situation : public interface Intr { public void m1(); } public abstract class Abs { public void m1() { System.out.println("Abs.m1()"); } // public abstract void m1(); } public class A extends Abs implements Intr { @Override public void m1() { // which method am I overriding, well it is Abs.m1() but why? // if method implemented is Abs.m1(), then why I am not getting error for Intr.m1() not implemented. } }
0
[ 2, 205, 2109, 19, 6573, 17, 8502, 718, 800, 3726, 3726, 31, 281, 20, 1858, 13, 45, 317, 6573, 19, 6384, 13, 1, 317, 11364, 307, 165, 5, 6, 73, 13, 1, 317, 8502, 718, 12178, 13, 1, 317, 11364, 307, 165, 5, 6, 13, 1, 329, 9,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Question2Answer type of coding used === I am working on a website and I'm wanting to add some kind of question and answer system like Stackoverflow. I downloaded question2answer and it works perfectly, but when I look a how it is coded I don't understand a whole bunch, it is purely php with a lot of functions and I didn't come across any HTML. Looking into how it is written I find it interesting. I would like to learn more about how all of it works, but I have no idea what it is called (if it has a name). Does anyone know of a tutorial where I could learn a bit more about it. I am not counting on using question2answer for my website, I just used it to have an idea of how the system works and in the end I want to make this system on my own. The code looks something like this if it can help : require_once QA_INCLUDE_DIR.'qa-db-selects.php'; require_once QA_INCLUDE_DIR.'qa-app-format.php'; require_once QA_INCLUDE_DIR.'qa-app-updates.php'; // Determine whether path begins with qa or not (question and answer listing can be accessed either way) $requestparts=explode('/', qa_request()); $explicitqa=(strtolower($requestparts[0])=='qa'); if ($explicitqa) $slugs=array_slice($requestparts, 1); elseif (strlen($requestparts[0])) $slugs=$requestparts; else $slugs=array(); $countslugs=count($slugs); // Get list of questions, other bits of information that might be useful $userid=qa_get_logged_in_userid(); @list($questions1, $questions2, $categories, $categoryid, $favorite, $custompage)=qa_db_select_with_pending( qa_db_qs_selectspec($userid, 'created', 0, $slugs, null, false, false, qa_opt_if_loaded('page_size_activity')), qa_db_recent_a_qs_selectspec($userid, 0, $slugs), qa_db_category_nav_selectspec($slugs, false, false, true), $countslugs ? qa_db_slugs_to_category_id_selectspec($slugs) : null, ($countslugs && isset($userid)) ? qa_db_is_favorite_selectspec($userid, QA_ENTITY_CATEGORY, $slugs) : null, (($countslugs==1) && !$explicitqa) ? qa_db_page_full_selectspec($slugs[0], false) : null ); My website is kinda like a social website mostly for action sports, mostly to share media (pictures and videos) and ask questions etc. Do you think it could be a good idea to rewrite all my website in the same kind of format as question2answer ?
0
[ 2, 1301, 135, 5950, 4662, 1001, 16, 13, 15458, 147, 800, 3726, 3726, 31, 589, 638, 27, 21, 2271, 17, 31, 22, 79, 4638, 20, 3547, 109, 825, 16, 1301, 17, 1623, 329, 101, 7566, 2549, 9990, 9, 31, 23887, 1301, 135, 5950, 4662, 17, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Get Error while installing TestNG === I have tried to install TestNG in Eclipse Java EE IDE for Web Developers. Version: Juno Release Build id: 20120614-1722 During Installation I caught following error and My installation is stopped. An error occurred while collecting items to be installed session context was:(profile=epp.package.jee, phase=org.eclipse.equinox.internal.p2.engine.phases.Collect, operand=, action=). No repository found containing: osgi.bundle,org.testng.eclipse,6.5.2.20120616_1545 No repository found containing: org.eclipse.update.feature,org.testng.eclipse,6.5.2.20120616_1545 Any Idea to resolve this issue??
0
[ 2, 164, 7019, 133, 25429, 1289, 2723, 800, 3726, 3726, 31, 57, 794, 20, 16146, 1289, 2723, 19, 11652, 8247, 13, 2851, 13, 3448, 26, 2741, 10168, 9, 615, 45, 21715, 830, 1895, 4924, 45, 563, 3370, 1419, 8, 1053, 2287, 112, 7758, 31...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Why existance of layout and layout-normal-mdpi does not produce compile-time error? === A naked `layout` resource directory Android OS interprets as `layout, normal, mdpi`, according to the docs. If I create a new project and make layout structure like this: /res/ /layout/ /layout-normal/ OR /res/ /layout/ /layout-normal-mdpi/ I get no error. Why? If there is no error, then I can conclude that naked `layout` directory **is not** `normal, mdpi`, but it's for all those layout which were not explicitly set, right?! So its purpose is always variable?! In example no.2., if I load the content on `normal, mdpi` mobile screen, will it load from the naked or explicit directory? Thanks in advance anyone taking time to clarify this for me.
0
[ 2, 483, 3182, 2416, 16, 9106, 17, 9106, 8, 17462, 8, 79, 43, 2159, 630, 52, 2213, 26561, 8, 891, 7019, 60, 800, 3726, 3726, 21, 5426, 13, 1, 4414, 1320, 1, 6577, 16755, 13005, 13, 759, 11584, 18, 28, 13, 1, 4414, 1320, 15, 182...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Checking Validity of DEFLATED data === I have some data that has been passed through the DEFLATE algorithm. If I run the command `perl -MCompress::Zlib -e 'undef $/; print uncompress(<>)' < deflated_data.gz` The correct output is printed. However, if I use the following code on the same data, I receive a `InvalidDataException` when trying to inflate the data. Is there any implementation of INFLATE that will show me where the data is not correct? public byte[] Inflate(byte[] inputData) { using (Stream input = new DeflateStream(new MemoryStream(inputData), CompressionMode.Decompress)) { using (MemoryStream output = new MemoryStream()) { input.CopyTo(output); return output.ToArray(); } } }
0
[ 2, 9886, 19058, 16, 121, 13830, 69, 1054, 800, 3726, 3726, 31, 57, 109, 1054, 30, 63, 74, 1100, 120, 14, 6312, 6554, 9083, 9, 100, 31, 485, 14, 1202, 13, 1, 1432, 255, 13, 8, 79, 960, 5890, 45, 45, 380, 8326, 13, 8, 62, 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...
Advanced CSS Nav Hover === See here for my issue: http://jsfiddle.net/FvBqA/126/ My issue is that I want to be able to hover on the anchor and the li and achieve one hover state if that make sense. Currently if you hover over the blue section the blue is only visible ( this is the li ) and if you hover over the anchor the li and anchor hover appears - please note that this is correct however, I only want this hover state when a user hovers over the anchor. If the user were to hover over the list item then nothing should appear. Help!
0
[ 2, 2255, 272, 18, 18, 16048, 21350, 800, 3726, 3726, 196, 235, 26, 51, 1513, 45, 7775, 6903, 728, 18, 1707, 12312, 9, 2328, 118, 410, 20468, 8681, 118, 918, 12626, 51, 1513, 25, 30, 31, 259, 20, 44, 777, 20, 21350, 27, 14, 6265,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Converting C++ pointer to member to C# === I've been researching how to successfully convert C++ pointer-to-member to C# but I haven't found anything useful yet. Let's say I have this function. typedef int STRUCT::*DEFINED; protected static Method(STRUCT* sampleStruct, DEFINED pMember) { return (sampleStruct->*pMember); } I have learned through my research that ->* is a pointer-to-member. In this case, we send a pointer of a member variable in a struct called STRUCT. Since Method isn't really sure which member was sent as a parameter, it accesses it through pointer-to-member sampleStruct->*pMember. I think Reflection could help to convert this code to C#, or maybe Delegates, but I really don't know how to implement it, and I haven't found any similar example online. Any help will be appreciated. Thanks, YT
0
[ 2, 19583, 272, 20512, 454, 106, 20, 322, 20, 272, 5910, 800, 3726, 3726, 31, 22, 195, 74, 527, 68, 184, 20, 3673, 8406, 272, 20512, 454, 106, 8, 262, 8, 6990, 20, 272, 5910, 47, 31, 2933, 22, 38, 216, 602, 4811, 768, 9, 408, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 is Linq-to-sql incorrectly removing fields in my union? === I am trying to aggregate several queries together to provide a latest updates display for my users using a common data structure for union support. In my first function I have the following select clause: .Select(x => new PlayerUpdateInfo { FirstName = x.xosPodOptimizedSearch.FirstName, LastName = x.xosPodOptimizedSearch.LastName, RecruitId = x.RecruitId, Date = x.Date, UpdateMessage = x.IsAddedAction ? "Player was added to this recruiting board by " + x.xosPerson.FirstName + " " + x.xosPerson.LastName : "Player was removed from this recruiting board by " + x.xosPerson.FirstName + " " + x.xosPerson.LastName, // Defaults for union support Team = string.Empty, UpdateComments = x.Comments, TeamId = 0, State = string.Empty }); When called this correctly generates a query that returns 9 fields. The second method's select is: select new PlayerUpdateInfo { FirstName = recruit.FirstName, LastName = recruit.LastName, RecruitId = recruit.RecruitId, Date = asset.CreateDate, UpdateMessage = "New Full Game Added", // Defaults for union support Team = null, UpdateComments = null, TeamId = 0, State = null }; When this query is run by itself it correctly returns 9 values. However, when I try to do var query = GetFirstQuery(); query = query.union(GetSecondQuery()); I get a sql exception that the query failed because all the queries do not have the same number of fields. Investigating the generated SQL shows that the first query is correct, but Linq is generating the 2nd (unioned) query to only have 7 fields. After testing it appears that Linq seems to be "optimizing" out the nulls so it's only returning one null column instead of 3, thus causing a mis-match. Why is Linq-to-sql incorrectly generating the union and how can I work around this?
0
[ 2, 483, 25, 6294, 1251, 8, 262, 8, 18, 22402, 22870, 9096, 2861, 19, 51, 667, 60, 800, 3726, 3726, 31, 589, 749, 20, 8544, 238, 9386, 2829, 429, 20, 1181, 21, 5736, 16779, 3042, 26, 51, 3878, 568, 21, 757, 1054, 1411, 26, 667, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Is there any UK address grammar subscription service (for vxml) available? === I am looking for a grammar (grxml for voice xml) subscription for UK. Please let me know if you came across this any time. Thanks in advance.
0
[ 2, 25, 80, 186, 1063, 3218, 7207, 14213, 365, 13, 5, 1106, 566, 396, 8184, 6, 904, 60, 800, 3726, 3726, 31, 589, 699, 26, 21, 7207, 13, 5, 8807, 396, 8184, 26, 430, 23504, 6, 14213, 26, 1063, 9, 2247, 408, 55, 143, 100, 42, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0...
How does affected_rows() Work? === public function create($tableName, $userInput) { $this->db->insert($tableName, $userInput); return $this->db->affected_rows(); } As you see, `$this->db->affected_rows();` is not referencing to any specific resource/executed statement. **Does affected_rows() return latest affected_rows() in the database generally? In other words, if i have 50 users calling create(...) function, how does codeigniter associate each affected_rows() to its executed statement?** This questions is codeigniter specific.
0
[ 2, 184, 630, 4114, 1, 5417, 18, 5, 6, 170, 60, 800, 3726, 3726, 317, 1990, 1600, 5, 4403, 5924, 7259, 15, 5579, 16704, 108, 4881, 6, 13, 1, 5579, 1565, 8, 1, 9007, 8, 1, 108, 18, 6767, 5, 4403, 5924, 7259, 15, 5579, 16704, 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...
Planning an Android UI === I am just starting out with Android and I am struggling to familiarize myself with the the views available. I am working on an app for a tablet where I would ideally have a "split screen", with the left-hand side essentially being a vertical list of items. On selecting an item from the left-hand pane the right hand pane would show details of the thing selected. ( I guess this would be like the email app UI ). I could build this interface in C# or a web based system - where would you begin on an Android system
0
[ 2, 2334, 40, 13005, 13, 5661, 800, 3726, 3726, 31, 589, 114, 1422, 70, 29, 13005, 17, 31, 589, 7587, 20, 3694, 2952, 992, 29, 14, 14, 4146, 904, 9, 31, 589, 638, 27, 40, 4865, 26, 21, 16394, 113, 31, 83, 5628, 102, 57, 21, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Why do people use div.border in a css file insead of just .border? === I was wondering why some css files use div.border instead of .border to list a sector in CSS. I have seen it used for multiple sectors like div.footer {color:#000000;} instead of just .footer {color:#000000;} Thanks for any help.
0
[ 2, 483, 107, 148, 275, 13, 12916, 9, 24389, 19, 21, 272, 18, 18, 3893, 19, 18, 18530, 16, 114, 13, 9, 24389, 60, 800, 3726, 3726, 31, 23, 5712, 483, 109, 272, 18, 18, 6488, 275, 13, 12916, 9, 24389, 700, 16, 13, 9, 24389, 20...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
ycsb for mongodb === I'm trying to benchmark locally running instance of mongoDB using YCSB. I'm getting the following exception while inserting the load: YCSB Client 0.1 Command line: -db com.yahoo.ycsb.db.MongoDbClient -s -P workloads/workloada -load Loading workload... Starting test. Could not initialize MongoDB connection pool for Loader: java.lang.NullPointerException java.lang.NullPointerException at com.yahoo.ycsb.db.MongoDbClient.init(MongoDbClient.java:78) at com.yahoo.ycsb.DBWrapper.init(DBWrapper.java:63) at com.yahoo.ycsb.ClientThread.run(Client.java:189) java.lang.NullPointerException [OVERALL], RunTime(ms), 5.0 [OVERALL], Throughput(ops/sec), 0.0 The command is as follows: ./bin/ycsb load mongodb -s -P workloads/workloada I'm running it on Rhel 6.1 and using out of box ycsb 0.1.4.
0
[ 2, 13, 93, 6824, 220, 26, 3521, 5474, 220, 800, 3726, 3726, 31, 22, 79, 749, 20, 25324, 6680, 946, 4851, 16, 3521, 5474, 220, 568, 13, 93, 6824, 220, 9, 31, 22, 79, 1017, 14, 249, 5391, 133, 14692, 68, 14, 6305, 45, 13, 93, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
InvalidOperationException with arrayLists === I am getting this exception: `Collection was modified; enumeration operation may not execute.` Directly after this code: else if (count == 0) { partCategory.Add(words[count].ToString()); foreach (string categoryS in partCategory) { if (categoryS != words[count].ToString()) { partCategory.Add(words[count].ToString()); } } } I am taking a guess that it may be the Add method that was used prior to it, but I'm not sure. Call Stack Code: **********.exe!**********m.FileController.readSortText(string fileName = "**********extracted\\PC120701.txt", System.Windows.Forms.ProgressBar newProgress = {Value = 0 Min = 0 Max = 100}) Line 78 + 0x207 bytes C# **********.exe!**********.mainForm.unzipFile(string fileName = "**********") Line 133 + 0x42 bytes C# **********.exe!**********.mainForm.decompress_Click(object sender = {Text = "Unzip"}, System.EventArgs e = {X = 49 Y = 7 Button = Left}) Line 163 + 0x17 bytes C# [External Code] **********.exe!**********.Program.Main() Line 18 + 0x28 bytes C# [External Code] Thanks for your future help!
0
[ 2, 16671, 11377, 10066, 872, 29, 7718, 5739, 18, 800, 3726, 3726, 31, 589, 1017, 48, 5391, 45, 13, 1, 15015, 872, 23, 5372, 73, 26940, 872, 1453, 123, 52, 15644, 9, 1, 1703, 75, 48, 1797, 45, 962, 100, 13, 5, 16549, 800, 3726, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Efficient (fastest) way to sum elements of matrix in matlab === Lets have matrix `A` say `A = magic(100);`. I have seen 2 ways of computing sum of all elements of matrix `A`. sumOfA = sum(sum(A)); Or sumOfA = sum(A(:)); Is one of them faster (or better practise) then other? If so which one is it? Or are they both equally fast?
0
[ 2, 8243, 13, 5, 13088, 1430, 6, 161, 20, 3907, 2065, 16, 8187, 19, 4277, 9086, 800, 3726, 3726, 6884, 57, 8187, 13, 1, 58, 1, 395, 13, 1, 58, 800, 2154, 5, 4031, 6, 73, 1, 9, 31, 57, 541, 172, 2847, 16, 10626, 3907, 16, 65...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...