unified_texts
stringlengths
32
30.1k
OpenStatus_id
int64
0
4
input_ids
list
token_type_ids
list
attention_mask
list
Impossible to run cython module directly? === I have a very basic test script for cython test1.pyx: def do_something(f): return f def main(): f = 1 print do_something(f) if __name__ == "__main__": main() Which I compile with: cython test1.pyx gcc -Wall -O2 -g -lm -shared -pthread -fPIC -fwrapv -fno-strict-aliasing -Iinclude/python2.6 -o test1.so test1.c And it works: ./bin/python -c "import test1; test1.main()" 1 But calling it directly as a module doesn't work: ./bin/python -m test1 /mypath/bin/python: No code object available for test1 Why does this not work? How can I get it to work to directly call a cython script? Cython version 0.12.1
0
[ 2, 3992, 20, 485, 6728, 11570, 12613, 1703, 60, 800, 3726, 3726, 31, 57, 21, 253, 2125, 1289, 3884, 26, 6728, 11570, 1289, 165, 9, 6448, 396, 45, 6312, 107, 1, 9099, 5, 410, 6, 45, 788, 398, 6312, 407, 5, 6, 45, 398, 800, 137,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
run on windows startup the squiggle === I am pure php developer, i need to do desktop lan intranet chat application.So i just download the application with source code from net. Its squiggle.I have installed the application successfully and also its working fine.Now i need to modify something in that application. That application not have the functionality which means, run on windows startup the squiggle.It didn't run on windows start up. I need to do add that functionality.But that functionality is available in settings option but its option only, but i need that functionality by default. Anyone give idea for this. Thanks in advance.
2
[ 2, 485, 27, 1936, 20205, 14, 15330, 24237, 800, 3726, 3726, 31, 589, 4267, 13, 26120, 10058, 15, 31, 376, 20, 107, 17404, 6178, 14369, 2328, 6615, 3010, 9, 656, 31, 114, 7121, 14, 3010, 29, 1267, 1797, 37, 4275, 9, 82, 15330, 2423...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
base property in IndexColumn annotation === Anybody know what does it mean base property in @IndexColumn annotation? And what a different between base=0 and base=1
0
[ 2, 1000, 1354, 19, 4348, 716, 4404, 103, 40, 1270, 857, 800, 3726, 3726, 11181, 143, 98, 630, 32, 884, 1000, 1354, 19, 13, 1, 25671, 716, 4404, 103, 40, 1270, 857, 60, 17, 98, 21, 421, 128, 1000, 3726, 387, 17, 1000, 3726, 165, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
XML Parsing - node.text method removing trailling spaces === I have a big xml file which i'm parsing using jscript. I have used the following code to load the xml var xmlDoc = Sys.OleObject("Msxml2.DOMDocument.6.0"); xmlDoc.async = false; // Load xml data from a file xmlDoc.load(this._studyDocPath); Now if i use the following code var text = this.xmlDoc.selectSingleNode(xPath); text = node.text; the text variable holds the innertext of a perticular tag. But if I have tag like this <Text>ABCD </Text> then the node.text returns me only the value 'ABCD' i.e. it automatically trims the space. But I dont need to trim any trailling spaces. I need the text as it is. How can I achieve that? Looking forward to your response Thanks in Advance
0
[ 2, 23504, 2017, 18, 68, 13, 8, 15421, 9, 11969, 2109, 9096, 2657, 802, 7644, 800, 3726, 3726, 31, 57, 21, 580, 23504, 3893, 56, 31, 22, 79, 2017, 18, 68, 568, 487, 8741, 9, 31, 57, 147, 14, 249, 1797, 20, 6305, 14, 23504, 4033...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 find out if first simbol is "_" and if true remove it and make first letter capital? === We have a string (`0 .. N` simbols long). How to find out if its first simbol is `"_"` and if true remove it and make first letter capital (fro example `"_distance"` `=>` `"Distance"`)?
0
[ 2, 184, 20, 477, 70, 100, 64, 4861, 6966, 25, 13, 7, 1, 7, 17, 100, 1151, 4681, 32, 17, 233, 64, 1748, 1057, 60, 800, 3726, 3726, 95, 57, 21, 3724, 13, 5, 1, 387, 13, 9, 9, 13, 103, 1, 4861, 6966, 18, 175, 6, 9, 184, 2...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Exception when trying browser navigate into value selected in combobox === I have problem when trying to navigate my browser component into my combobox selected value - when the combobox value is changed. It works fine when I'm doing it like below (but then it isnt fired when combobox2 is changed): private void comboBox1_SelectedIndexChanged(object sender, EventArgs e) { string[] filePaths = Directory.GetFiles(sites.paths[comboBox1.SelectedIndex]); List<Foo> combo2data = new List<Foo>(); foreach (string s in filePaths) { Foo fileInsert = new Foo(); fileInsert.path = s; fileInsert.name = Path.GetFileName(s); combo2data.Add(fileInsert); } comboBox2.DataSource = combo2data; comboBox2.ValueMember = "path"; comboBox2.DisplayMember = "name"; this.webBrowser1.Navigate((string)comboBox2.SelectedValue); // THE MOST IMPORTANT LINE : ) } But I see an exception (Unable to cast object of type App1.Foo to type System.String), when It's like that: private void comboBox1_SelectedIndexChanged(object sender, EventArgs e) { string[] filePaths = Directory.GetFiles(sites.paths[comboBox1.SelectedIndex]); List<Foo> combo2data = new List<Foo>(); foreach (string s in filePaths) { Foo fileInsert = new Foo(); fileInsert.path = s; fileInsert.name = Path.GetFileName(s); combo2data.Add(fileInsert); } comboBox2.DataSource = combo2data; comboBox2.ValueMember = "path"; comboBox2.DisplayMember = "name"; } private void comboBox2_SelectedIndexChanged(object sender, EventArgs e) { this.webBrowser1.Navigate((string)comboBox2.SelectedValue); }
0
[ 2, 5391, 76, 749, 16495, 20782, 77, 1923, 1704, 19, 22621, 5309, 800, 3726, 3726, 31, 57, 1448, 76, 749, 20, 20782, 51, 16495, 5912, 77, 51, 22621, 5309, 1704, 1923, 13, 8, 76, 14, 22621, 5309, 1923, 25, 1015, 9, 32, 693, 1123, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Authorize user actions === I'm using CanCan to authorize users' actions, and it works well, but now I need to display a message to user. For example, user clicks on 'comment' button, and cancan checks for a following conditions: - User is activated - User is not banned - User registered > 1 day ago. - At least 10 minutes passed since user's last comment. Now I have it in cancan's ability model, it tells user "you are not allowed to post a comment" if one of the conditions isn't true. What is the best way to make messages more detailed? User should see an error like "Your account is not activated" and so on. I thought to just put a code in controller, but I have not the only User, and I need to do the same at other controllers.
0
[ 2, 1314, 2952, 4155, 3078, 800, 3726, 3726, 31, 22, 79, 568, 92, 1245, 20, 1314, 2952, 3878, 22, 3078, 15, 17, 32, 693, 134, 15, 47, 130, 31, 376, 20, 3042, 21, 2802, 20, 4155, 9, 26, 823, 15, 4155, 10840, 18, 27, 13, 22, 96...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Use Rails nested resources on their own === I have a Rails application which has an Employee model, a Skill model and a Department model. class Employee < ActiveRecord::Base belongs_to :department has_and_belongs_to_many :skills attr_accessible :email, :firstname, :name, :twitter end class Skill < ActiveRecord::Base has_and_belongs_to_many :employees attr_accessible :name end class Department < ActiveRecord::Base attr_accessible :name end I was trying to write down the routes for this, but this is where I run into trouble. I think it makes sense to do resources :employees do resource :department resources :skills end however, I also want to be able to create skills and departments independently. I only need to be able to 'hook up' a department and a skill to an employee. The routes, like this, make sense (/employees/:id/skills, /employees/:id/department), but like I said, I would like to be able to do /departments /skills /skills/new etc.. I could do EmployeeList::Application.routes.draw do resources :departments resources :skills resources :employees do resource :department resources :skills end end and this provides me with the routes I want, but it looks like really bad practice having the resources listed twice in my routes.rb file. How should I do this?
0
[ 2, 275, 2240, 18, 5618, 69, 2566, 27, 66, 258, 800, 3726, 3726, 31, 57, 21, 2240, 18, 3010, 56, 63, 40, 7362, 1061, 15, 21, 6148, 1061, 17, 21, 604, 1061, 9, 718, 7362, 13, 1, 1348, 14953, 45, 45, 8436, 7034, 1, 262, 13, 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...
Multiple Layer-In-Folder Editing === So basically i have 10 copies of the same folder in 10 other seperate folders, and i want to edit the contents of the folders all at once. All i want to do is move 2 layers to a different location for every single folder i have. How would i go about doing this? Would anyone recommend batch or anything? and if so, it would be cool if someone could help and tell me how to do the required process too. Thank you. Edit: So for some reason my question is not going through so im going to assume i need more text or something so please dont read this as this is just random text im adding for no reason. im sorry.
0
[ 2, 1886, 5385, 8, 108, 8, 8814, 106, 9510, 800, 3726, 3726, 86, 11374, 31, 57, 332, 3298, 16, 14, 205, 19294, 19, 332, 89, 10332, 106, 1373, 19294, 18, 15, 17, 31, 259, 20, 9392, 14, 8478, 16, 14, 19294, 18, 65, 35, 382, 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...
JIRA Update custom fields using REST, PHP and cURL === I am trying to update some custom fields using the REST API and PHP/cURL. Somehow, and I'm wondering if I might have edited something without realizing it, while what I have below "worked" yesterday (I think), it does not work now. I get varying responses using the different "methods", from: 1. > HTTP 405 - The specified HTTP method is not allowed for the requested > resource (). I get this one using the POST method, as it is uncommented below. 2. `{"status-code":500,"message":"Read timed out"}` I get this one if I use the commented-out PUT method, with POST commented out. 3. `{"errorMessages":["No content to map to Object due to end of input"]}` And this one mixing and matching PUT and POST. What am I missing/doing wrong? I am using the following code: <?php $username = 'username'; $password = 'password'; $url = "https://example.com/rest/api/2/issue/PROJ-827"; $ch = curl_init(); $headers = array( 'Accept: application/json', 'Content-Type: application/json' ); $test = "This is the content of the custom field."; $data = <<<JSON { "fields": { "customfield_11334" : ["$test"] } } JSON; curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_VERBOSE, 1); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0); curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); curl_setopt($ch, CURLOPT_HEADER, 0); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, $data); // Also tried, with the above two lines commented out... // curl_setopt($ch, CURLOPT_PUT, 1); // curl_setopt($ch, CURLOPT_INFILE, $data); // curl_setopt($ch, CURLOPT_INFILESIZE, strlen($data)); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_USERPWD, "$username:$password"); $result = curl_exec($ch); $ch_error = curl_error($ch); if ($ch_error) { echo "cURL Error: $ch_error"; } else { echo $result; } curl_close($ch); ?>
0
[ 2, 487, 3517, 11100, 5816, 2861, 568, 760, 15, 13, 26120, 17, 14320, 800, 3726, 3726, 31, 589, 749, 20, 11100, 109, 5816, 2861, 568, 14, 760, 21, 2159, 17, 13, 26120, 118, 4734, 255, 9, 3625, 15, 17, 31, 22, 79, 5712, 100, 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...
django form + weird behavior with arrays === I have a `clean` function for my form, and in it I have the below: tags = cleaned_data.get("tags") logger.info('got to clean function ' + str(tags)) When I output the `tags` value, I see: `[ '1', '2', '3' ]`. In my template, when I want to recreate the html for it, I have a template_tag: @register.simple_tag def generate_tags(event_tags): print str(event_tags) # Code to produce the html and I'm calling it via: `{% generate_tags form.tags %}`. However, when I finish the `print` command in the template function im getting: <input type="hidden" name="event_tags" value="3" id="id_event_tags_0" /> Why isn't it giving me the array as I was seeing in the clean function??
0
[ 2, 3857, 14541, 505, 2754, 5455, 3257, 29, 7718, 18, 800, 3726, 3726, 31, 57, 21, 13, 1, 20254, 1, 1990, 26, 51, 505, 15, 17, 19, 32, 31, 57, 14, 1021, 45, 3383, 18, 800, 13143, 1, 18768, 9, 3060, 5, 7, 8628, 18, 7, 6, 13,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Conditional Tags for Custom Taxonomy in Custom Post Type === I do hope you give me a practical answer for this (maybe simple problem for you). I have crated a Custom Post Type named (example:) "Cuspost" and I have Custom Taxonomy inside Cuspost named "Custax". Then I have taxonomies: "A Custax" and "B Custax" inside Custax. What I want to do is just want to check the value of the Custax, for example with `has_custax('a-custax')` (similar to `has_category('a-category')`); Next using is for this: <?php if (has_custax('a-custax')) { echo 'do something A'; } else { echo 'do something B'; } For your reference, I've read this ([http://wordpress.org/support/topic/custom-taxonomies-conditional-tags#post-1110167][1]) and it aint work. Thanks for help. [1]: http://wordpress.org/support/topic/custom-taxonomies-conditional-tags#post-1110167
0
[ 2, 21206, 3383, 18, 26, 5816, 26802, 19, 5816, 678, 1001, 800, 3726, 3726, 31, 107, 1376, 42, 590, 55, 21, 5713, 1623, 26, 48, 13, 5, 5138, 1935, 1448, 26, 42, 6, 9, 31, 57, 19904, 43, 21, 5816, 678, 1001, 377, 13, 5, 29041, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Windows Phone local database changes listener === I am new to windows phone development and facing an issue. I want my application to act like a listener to any changes being made in local DB. If application is running and any change is made in the DB (e.g by background agent) then the foreground application should be notified right away. Is there any way I could register some kind of event in my foreground application which is triggered when there is any change in the local DB?
0
[ 2, 1936, 1132, 375, 6018, 1693, 21772, 800, 3726, 3726, 31, 589, 78, 20, 1936, 1132, 522, 17, 4325, 40, 1513, 9, 31, 259, 51, 3010, 20, 601, 101, 21, 21772, 20, 186, 1693, 142, 117, 19, 375, 13, 9007, 9, 100, 3010, 25, 946, 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...
NSNumberFormatter, NSDecimalNumber and Scientific Notation === I'm having a serious dispute with NSNumberFormatter, and even after going through its extensive documentation, I haven't quite been able to wrap my head around a pretty straightforward issue that I encountered. I hope you guys can help me out. What I have: an `NSDecimalNumber` representing a calculation result, displayed in a `UITextField`<br> What I need: Scientific notation of that result. What I'm doing: -(void)setScientificNotationForTextField:(UITextField*)tf Text:(NSString*)text { NSString* textBefore = text; // use scientific notation, i.e. NSNumberFormatterScientificStyle NSNumberFormatter* formatter = [[NSNumberFormatter alloc] init]; //[formatter setGeneratesDecimalNumbers:YES]; [formatter setNumberStyle:NSNumberFormatterScientificStyle]; NSDecimalNumber* number = (NSDecimalNumber*)[formatter numberFromString:text]; tf.text = [number descriptionWithLocale:[[Utilities sharedUtilities] USLocale]]; NSString* textAfter = tf.text; // DEBUG NSLog(@"setScientificNotation | text before = %@, text after = %@", textBefore, textAfter); [formatter release]; } What happens:<br> A certain result may be 0.0099. `textBefore` will hold that correct value. If I don't tell the formatter to generate decimal numbers (commented out in the above snippet), it will create an NSNumber from an NSDecimalNumber which creates a false result and turns `textAfter`into 0.009900000000000001 - a rounding error due to the reduced precision of NSNumber over NSDecimalNumber. <br> If I do tell the NumberFormatter to generate decimals, it will still create the wrong result . And what's more, where before it would insert the exponent notation (e.g. "1.23456e-10"), it would now generate (and thus display) the full decimal number, which is not what I want. <br>Again, I'd like to have the formatter use NSDecimalNumber so it doesn't falsify results plus have exponent notation where necessary. <br> Am I using the class wrong? Did I misinterpret the documentation? Can someone explain why this happens and how I can create the behavior I want? I will of course continue researching and update if I find anything.
0
[ 2, 13, 2172, 16299, 23588, 815, 15, 13, 2172, 9522, 49, 3482, 16299, 17, 2272, 15591, 800, 3726, 3726, 31, 22, 79, 452, 21, 2055, 6631, 29, 13, 2172, 16299, 23588, 815, 15, 17, 166, 75, 228, 120, 82, 3386, 13945, 15, 31, 2933, 2...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Only update the current Android widget ID in update method === I'm making a widget in android which produces a random number when clicked. When the widget is alone on the home screen it works perfectly, however when you add multiple of them they start to generate random numbers at the same time. Whats happening is when an individual widget is clicked it updates all of them; resulting in many random numbers. What i want is each widget to be isolated from the others; basically when a widget is clicked it only updates itself and non of the others around it. I think this is achievable by getting the ID of the current widget and update that one only, as apposed to the update method updating all the widgets; how do i do this? My code @Override public void onUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds) { // Get all ids ComponentName thisWidget = new ComponentName(context, MyWidgetProvider.class); int[] allWidgetIds = appWidgetManager.getAppWidgetIds(thisWidget); for (int widgetId : allWidgetIds) { // Create some random data int number = (new Random().nextInt(100)); RemoteViews remoteViews = new RemoteViews(context.getPackageName(), R.layout.widget_layout); Log.w("WidgetExample", String.valueOf(number)); // Set the text remoteViews.setTextViewText(R.id.update, String.valueOf(number)); // Register an onClickListener Intent intent = new Intent(context, MyWidgetProvider.class); intent.setAction(AppWidgetManager.ACTION_APPWIDGET_UPDATE); intent.putExtra(AppWidgetManager.EXTRA_APPWIDGET_IDS, appWidgetIds); PendingIntent pendingIntent = PendingIntent.getBroadcast(context, 0, intent, PendingIntent.FLAG_UPDATE_CURRENT); remoteViews.setOnClickPendingIntent(R.id.update, pendingIntent); appWidgetManager.updateAppWidget(widgetId, remoteViews); } } *Summary:* This code is the update method and is called when a widget is clicked. I want this method to only update the widget ID that called it, not for this method to update all the widgets ID's on the home screen.
0
[ 2, 104, 11100, 14, 866, 13005, 4807, 43, 3060, 4924, 19, 11100, 2109, 800, 3726, 3726, 31, 22, 79, 544, 21, 4807, 43, 3060, 19, 13005, 56, 6700, 21, 5477, 234, 76, 15802, 9, 76, 14, 4807, 43, 3060, 25, 1056, 27, 14, 213, 2324, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Java project won't compile to a JAR correctly for Android === in an app I'm working on I have an issue with a Java library which is here - https://github.com/kennydude/Boid-Twitter-API When I run `ant android` which builds an Android package it builds fine and Eclipse can read the Jar fine. But on my device it says that dalvik cannot locate any of the classes and eventually throws a ClassDef Exception. I have used Jars before, so I'm wondering if it's my ant file that's broken
0
[ 2, 8247, 669, 230, 22, 38, 26561, 20, 21, 5112, 12044, 26, 13005, 800, 3726, 3726, 19, 40, 4865, 31, 22, 79, 638, 27, 31, 57, 40, 1513, 29, 21, 8247, 1248, 56, 25, 235, 13, 8, 7775, 18, 6903, 10404, 20926, 9, 960, 118, 2853, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Quad textured with big texture doesn't show up === I've run into some issue with drawing a texture. Situation is as follows: I've got linux box with ati hardware and propietary ati driver, which is two or three years old - because of ati ditching old hw. I've got custom application with dedicated (mostly)2D engine based on opengl. (It was build over years and is quite mature, and never got problems like this) The problem happens, when vram (which is taken from system memory, 2GB in this particular case) is almost to maximum filed with textures. When in scene there is a quad, which is textured with texture over 2048x2048 it is not drawn. When I do timing of particular surfaces, the surface which takes most time to draw is not the one being textured with big tex (takes about 87 us), but the next one drawn after it (takes ~900 ms!). The scene being drawn, doesn't use all the textures from vram, but only, let's say: 8%. Unfortunatelly, I cannot free even a small part of it. The application is usually working under that kind of vram-stressed conditions, and never behaved like this. glGetError() returns nothing. All other textures are drawn normally.
0
[ 2, 13559, 12714, 43, 29, 580, 12714, 1437, 22, 38, 298, 71, 800, 3726, 3726, 31, 22, 195, 485, 77, 109, 1513, 29, 3533, 21, 12714, 9, 1858, 25, 28, 2415, 45, 31, 22, 195, 330, 13024, 1649, 29, 35, 49, 7610, 17, 9476, 660, 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...
Visual Studio 2010 current row highlight === I'm using Productivity Power Tools' Highlight current line feature. However, I'd also like to highlight the current _column_ (i.e. have a vertical highlighting bar). How can I do this?
0
[ 2, 3458, 1120, 498, 866, 3131, 14373, 800, 3726, 3726, 31, 22, 79, 568, 18211, 414, 4672, 22, 14373, 866, 293, 1580, 9, 207, 15, 31, 22, 43, 67, 101, 20, 14373, 14, 866, 13, 1, 716, 4404, 103, 1, 13, 5, 49, 9, 62, 9, 57, 2...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0...
search for campaigns with multiple values for status parameter === I'd like to ask for the correct parameter to pass when retrieving for campaigns that are both active and notStarted. Thanks! //not working https://api.foursquare.com/v2/campaigns/list?status=active&status=notStarted
0
[ 2, 2122, 26, 8433, 29, 1886, 4070, 26, 1782, 18906, 800, 3726, 3726, 31, 22, 43, 101, 20, 1349, 26, 14, 4456, 18906, 20, 1477, 76, 13, 6239, 3272, 8397, 26, 8433, 30, 50, 156, 1348, 17, 52, 13680, 69, 9, 3669, 187, 12894, 1270, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
WhirlyGlobe for Android? === Is there anything like WhirlyGlobe for Android? I just need to place a texture on a sphere that can be manipulated by the user. It must also be able to place overlays at various latitudes and longitudes. I don't want to include whole 3D engines and I don't really want to code with bunches of arrays and GL specifics. Are there any options or is OpenTK the best?
0
[ 2, 619, 5551, 102, 6725, 863, 26, 13005, 60, 800, 3726, 3726, 25, 80, 602, 101, 619, 5551, 102, 6725, 863, 26, 13005, 60, 31, 114, 376, 20, 209, 21, 12714, 27, 21, 9228, 30, 92, 44, 22953, 34, 14, 4155, 9, 32, 491, 67, 44, 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...
WPF Generating Multiple ListViews at Runtime === Is it possible to have something like this : COMPANY A <br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;EMPLOYEE 1 | ALBERT &nbsp;&nbsp;&nbsp;| EINSTEIN<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;EMPLOYEE 2 | ISAAC &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;| NEWTON<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;EMPLOYEE 3 | STEPHEN | HAWKING<br> COMPANY B<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;EMPLOYEE 1 | OBI-WAN &nbsp;| KENOBI<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;EMPLOYEE 2 | LUKE &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;| SKYWALKER<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;EMPLOYEE 3 | R2&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;| D2<br> I want to add companies on the fly programmatically at runtime, and bind them to EMPLOYEE object Listss that will change frequently. PS : I really have *extremely* short dev delays (<1H) so I really have no time to familiarize with TreeView & MVVVM. I just need something ultra-basic, wimple, & stupid to start up with.
0
[ 2, 619, 7721, 13500, 1886, 968, 4725, 18, 35, 485, 891, 800, 3726, 3726, 25, 32, 938, 20, 57, 301, 101, 48, 13, 45, 237, 21, 13, 1, 5145, 1, 279, 13502, 3401, 73, 1569, 13502, 3401, 73, 1569, 13502, 3401, 73, 1569, 13502, 3401, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Program to generate a new table in MySQL database everytime the program is run === My program is not able to generate a new name for the table evertime the program s run as a result of which it not being created. here is my code :- package org.java.myfirstapp; import java.sql.*; public class ConnectForm { public void createFormData(String name,String num){ Connection con=null; try{ Class.forName("com.mysql.jdbc.Driver").newInstance(); con = DriverManager.getConnection("jdbc:mysql://localhost:3306/formdata", "root", null); try{ int no=1,no1 = 0; do{Statement st=con.createStatement(); no1=no; int x; x= st.executeUpdate("create table form"+no+" (Product varchar(20),Fields varchar(20))"); if(x==0){ st.executeUpdate("insert into form"+no+" values ('"+name+"','"+num+"')"); } else { no++;} }while(no1<no); } catch(SQLException e1){ System.err.println("Error code:"+e1.getMessage());} } catch(Exception e1){ e1.printStackTrace(); } } }
0
[ 2, 625, 20, 7920, 21, 78, 859, 19, 51, 18, 22402, 6018, 352, 891, 14, 625, 25, 485, 800, 3726, 3726, 51, 625, 25, 52, 777, 20, 7920, 21, 78, 204, 26, 14, 859, 462, 891, 14, 625, 13, 18, 485, 28, 21, 829, 16, 56, 32, 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...
Implicit import from submodules === I've got a package like this: foo/ __init__.py bar.py baz.py I'd like to have submodules' functions automatically available when I import `foo`. So if `bar.py` has `def spam()` somewhere, I'd like to be able to call it directly like `foo.spam()`. What would be the best way to achieve that?
0
[ 2, 20290, 9010, 37, 972, 19673, 160, 800, 3726, 3726, 31, 22, 195, 330, 21, 6030, 101, 48, 45, 4310, 111, 118, 13, 1, 108, 242, 1, 9, 6448, 748, 9, 6448, 19674, 9, 6448, 31, 22, 43, 101, 20, 57, 972, 19673, 160, 22, 3719, 74...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
hibernate like technology as a persistence layer for groovy? === I was wondering if there is like a persistence layer for groovy that is integrated on the ide to generate code automatically based on your database structure?
0
[ 2, 4148, 2102, 8820, 101, 1099, 28, 21, 28584, 5385, 26, 3452, 2026, 93, 60, 800, 3726, 3726, 31, 23, 5712, 100, 80, 25, 101, 21, 28584, 5385, 26, 3452, 2026, 93, 30, 25, 5547, 27, 14, 13, 3448, 20, 7920, 1797, 7499, 432, 27, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
What is best practice for SQL Server failover cluster database access tier? === In principle an SQL Server failover cluster presents itself as a virtual machine that applications can connect to oblivious to the fact that the SQL Server is actually a cluster of servers, hence, in principle no additional logic is required within the database access tier of the application. My question is whether the above is true and whether there are best practice modifications to how the DB access tier operates when using a failover cluster. E.g. presumably when failover occurs there will be a delay that may cause a time-out error at the DB access tier, we are considering putting logic in that tier to re-try [some] DB calls upon a timeout occurring (we already have retry logic for DB deadlocks). This provides another level of protection from errors affecting the application. If a failover switch occurs and results in the higher application level receiving a timeout error on a service call then that is not seamless switch over. Should we simply be setting our timeouts at a duration that allows for failover? Thanks.
0
[ 2, 98, 25, 246, 1345, 26, 4444, 255, 8128, 7476, 2549, 7460, 6018, 1381, 7197, 60, 800, 3726, 3726, 19, 5897, 40, 4444, 255, 8128, 7476, 2549, 7460, 7992, 1145, 28, 21, 6599, 1940, 30, 3767, 92, 6379, 20, 20970, 20, 14, 837, 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...
Null pointer Exception: GestureDetector.onTouchEvent for custom gallery in android for ICS 4.0 === I am builiding an android application in which I am using custom gallery to show images . (I am using custom gallery in order to show 1 item a time when swapping the gallery) Here is the code that I am using for custom gallery : public class CustomGallery extends Gallery { public CustomGallery(Context context) { super(context); } public CustomGallery(Context context, AttributeSet attrs) { super(context, attrs); } public CustomGallery(Context context, AttributeSet attrs, int defStyle) { super(context, attrs, defStyle); } private boolean isScrollingLeft(MotionEvent e1, MotionEvent e2) { return e2.getX() > e1.getX(); } @Override public boolean onFling(MotionEvent e1, MotionEvent e2, float velocityX, float velocityY) { int kEvent; if (isScrollingLeft(e1, e2)) { // Check if scrolling left kEvent = KeyEvent.KEYCODE_DPAD_LEFT; } else { // Otherwise scrolling right kEvent = KeyEvent.KEYCODE_DPAD_RIGHT; } onKeyDown(kEvent, null); return true; } } The above code is working fine 2.2,2.3 etc.... but its **crashing in ICS 4.0 causing Null pointer Exception GestureDetector.onTouchEvent** . Please help . Thanks in Advance.
0
[ 2, 16203, 454, 106, 5391, 45, 7222, 28262, 248, 9, 218, 15725, 4943, 38, 26, 5816, 2246, 19, 13005, 26, 13, 8354, 268, 9, 387, 800, 3726, 3726, 31, 589, 3183, 7502, 3258, 40, 13005, 3010, 19, 56, 31, 589, 568, 5816, 2246, 20, 29...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How to create custome Animation for hide panel === i have some panel in page (Like Visual studio), i Want when user click in Button hide this Panel hide with animation like visual studio![enter image description here][1] when user click on + icon toolbox with animation go to left side and hide. i want design this animation. thanks for help me. [1]: http://i.stack.imgur.com/6pKxI.jpg
1
[ 2, 184, 20, 1600, 5816, 62, 6236, 26, 3077, 4113, 800, 3726, 3726, 31, 57, 109, 4113, 19, 2478, 13, 5, 1403, 3458, 1120, 6, 15, 31, 259, 76, 4155, 10840, 19, 5167, 3077, 48, 4113, 3077, 29, 6236, 101, 3458, 1120, 187, 2558, 1367...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 for checking files in jUnit === Need to cover some test with jUnit. Method returns java.io.File. What is the best way to check it? - check file size? - check file name? - check ...? How you write jUnit tests for methods, that operate files? Is there any frameworks?
0
[ 2, 246, 161, 26, 9886, 6488, 19, 7446, 242, 800, 3726, 3726, 376, 20, 1227, 109, 1289, 29, 7446, 242, 9, 2109, 4815, 8247, 9, 1963, 9, 16877, 9, 98, 25, 14, 246, 161, 20, 2631, 32, 60, 13, 8, 2631, 3893, 1072, 60, 13, 8, 263...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 dismiss keyboard before pushing UIViewController in navigationController === My view contains UITableViewController which has UITextFields where some text can be entered. I adjust UITableView height when keyboard appears/disappears. It works great. Now I have UIAlertView with UITextField in it. User enters text in UITextField in UIAlertView & when Ok is pressed, I push another UIViewController. The problem is when I come back to the view it's screwed. The reason is with KeyboardWillHide notification is never fired & hence the height of tableView is application frame height - keyboard height. Any suggestions for fixing it? I called [resignFirstResponder] in - (void)alertView:(UIAlertView *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex but didn't help. I even forcefully called KeyboardWillHide but that also didn't help. Any suggestions?
0
[ 2, 184, 20, 14372, 8896, 115, 5076, 13, 5661, 4725, 12898, 1252, 19, 8368, 12898, 1252, 800, 3726, 3726, 51, 1418, 1588, 13, 11193, 579, 4725, 12898, 1252, 56, 63, 13, 5661, 11969, 1109, 18, 113, 109, 1854, 92, 44, 1297, 9, 31, 14...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
eclipse cannot generate makefiles automatically === My OS is Ubuntu12.04 64bit,and I download eclipse for c/c++ from this site: http://www.eclipse.org/downloads/download.php?file=/technology/epp/downloads/release/juno/R/eclipse-cpp-juno-linux-gtk-x86_64.tar.gz when I run the eclipse, I found the checkbox of "Generate Makefiles Automatically" if gray, but I want eclipse generate makefile automatically. thanks for any help. ![enter image description here][1] [1]: http://i.stack.imgur.com/8gAdX.png
0
[ 2, 11652, 1967, 7920, 233, 16877, 18, 7499, 800, 3726, 3726, 51, 13, 759, 25, 287, 12968, 2473, 918, 9, 3277, 4384, 3326, 15, 290, 31, 7121, 11652, 26, 272, 118, 150, 20512, 37, 48, 689, 45, 7775, 6903, 6483, 9, 3319, 6013, 870, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 start jboss 7.1.1 server and deploy project in jboss 7.1.1 === i use Jboss 7 server so i download jboss 7.1.1 version and unzip this zip file. then i go to bin folder and double click on standalone.bat but new cmd window open and close within 2 -3 sec . Other i run using cmd then give msg : E:\jboss-as-7.1.1.Final\bin>standalone.bat Calling "E:\jboss-as-7.1.1.Final\bin\standalone.conf.bat" then end it. so jboss server is not start , so please help me , how to run jboss server and deploy project in jboss in window 7 os.? Thanks kamlesh
0
[ 2, 184, 20, 799, 487, 10349, 18, 453, 9, 165, 9, 165, 8128, 17, 17617, 669, 19, 487, 10349, 18, 453, 9, 165, 9, 165, 800, 3726, 3726, 31, 275, 487, 10349, 18, 453, 8128, 86, 31, 7121, 487, 10349, 18, 453, 9, 165, 9, 165, 615...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 work with php forms and use the data for processing === I have just started learning PHP of late so bear with me if i make any mistake. my question is quite simple. i have to create a form with fields like Name, Address, Phone etc., store these values in an array and pass on them to another page with a submit button. I have gone through some tutorials on PHP but since it is needed on urgent basis, i do not have much time to go in depth. please send me relevant responses and do not hesitate to ask if i have not been able to explain clearly.
3
[ 2, 184, 20, 170, 29, 13, 26120, 1997, 17, 275, 14, 1054, 26, 5511, 800, 3726, 3726, 31, 57, 114, 373, 2477, 13, 26120, 16, 456, 86, 2746, 29, 55, 100, 31, 233, 186, 5643, 9, 51, 1301, 25, 1450, 1935, 9, 31, 57, 20, 1600, 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...
Creating a keyboard shortcut for a pop in a web page php === I need to activate a popup when the user press a key board shortcut. Can you please tell me how this can be done? Thanks!
0
[ 2, 2936, 21, 8896, 502, 4118, 26, 21, 1675, 19, 21, 2741, 2478, 13, 26120, 800, 3726, 3726, 31, 376, 20, 18163, 21, 1675, 576, 76, 14, 4155, 901, 21, 1246, 686, 502, 4118, 9, 92, 42, 2247, 494, 55, 184, 48, 92, 44, 677, 60, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
PHP max_execution_time not timing out === This is not one of the regular questions if sleep is counted for timeout or stuff like that. Ok, here's the problem: I've set the max_execution_time for PHP as 15 seconds and ideally this should time out when it crosses the set limit, but it doesn't. Apache has been restarted after the change to the php.ini file and an ini_get('max_execution_time') is all fine. Sometimes the script runs for upto 200 seconds which is crazy. I have no database communication whatsoever. All the script does is looking for files on the unix filesystem and in some cases re-directing to another JSP page. There is no sleep() on the script. I calculate the total execution time of the PHP script like this: At the start of the script I set : $_mtime = microtime(); $_mtime = explode(" ",$_mtime); $_mtime = $_mtime[1] + $_mtime[0]; $_gStartTime = $_mtime; and the end time($_gEndTime) is calculated similarly.<br /> The total time is calculated in a shutdown function that I've registered: register_shutdown_function('shutdown'); ............. function shutdown() { .............. .............. $_total_time = $_gEndTime - $_gStartTime; .............. switch (connection_status ()) { case CONNECTION_NORMAL: .... break; .... case CONNECTION_TIMEOUT: .... break; ...... } } <b>Note:</b> I cannot use $_SERVER['REQUEST_TIME'] because my PHP version is incompatible. That sucks - I know. 1) Well, my first question obviously is is why is my PHP script executing even after the set timeout limit? <br /> 2) Apache has the Timeout directive which is 300 seconds but the PHP binary does not read the Apache config and this should not be a problem. <br /> 3) Is there a possibility that something is sending PHP into a sleep mode?<br /> 4) Am I calculating the execution time in a wrong way? Is there a better way to do this? <br />I'm stumped at this point. PHP Wizards - please help.
0
[ 2, 13, 26120, 2049, 1, 1706, 17194, 3309, 1, 891, 52, 11812, 70, 800, 3726, 3726, 48, 25, 52, 53, 16, 14, 1290, 2346, 100, 1742, 25, 8799, 26, 85, 1320, 54, 3217, 101, 30, 9, 5854, 15, 235, 22, 18, 14, 1448, 45, 31, 22, 195,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 else do I need to do before the NDK is set up? === I have been working on setting up the NDK from this website for a few days now, but still can't get it to work correctly: http://psrdotcom.blogspot.fr/2011/12/android-ndk-jni-windows-xp7-with-3264.html. I am stuck at using the 'javah' command but think that it must have to do with my PATH variables. I have set the JAVA_HOME and NDK_HOME as well as PATH, but I must have set them incorrectly. Could someone help clarify what they mean by the JAVA_HOME and NDK_HOME directory? I know it means the java and ndk directory, but i've read some places that it needs to be the bin folder, or something like that. Here is a picture of when I try to run the javah command: EDIT: since I have less than ten reputation, I have to link the picture... but here is the link http://i.stack.imgur.com/7FYd6.png
0
[ 2, 98, 962, 107, 31, 376, 20, 107, 115, 14, 13, 706, 197, 25, 309, 71, 60, 800, 3726, 3726, 31, 57, 74, 638, 27, 2697, 71, 14, 13, 706, 197, 37, 48, 2271, 26, 21, 310, 509, 130, 15, 47, 174, 92, 22, 38, 164, 32, 20, 170,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Fancybox onload inline content issue === Hopefully someone here can help me! I'm trying to set up fancybox so when the webpage loads it displays some inline content. However I can't seem to get it to work. Here's the code I've used so far: <script type="text/javascript"> $(document).ready(function() { /* * Simple image gallery. Uses default settings */ $('.fancybox').fancybox(); /* * Different effects */ // Change title type, overlay opening speed and opacity $(".fancybox-effects-a").fancybox({ helpers: { title : { type : 'outside' }, overlay : { speedIn : 500, opacity : 0.95 } } }); $.fancybox.open([ { href : '#inline1', title : '1st title' } ], { padding : 0 });​ }); </script> <style type="text/css"> .fancybox-custom .fancybox-skin { box-shadow: 0 0 50px #222; } </style> And the html is as follows: <h1>fancyBox</h1> <ul> <li><a class="fancybox" href="#inline1" title="Lorem ipsum dolor sit amet">Inline</a></li> </ul> <div id="inline1" style="width:400px;display: none;"> <h3>Etiam quis mi eu elit</h3> <p> Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam quis mi eu elit tempor facilisis id et neque. Nulla sit amet sem sapien. Vestibulum imperdiet porta ante ac ornare. Nulla et lorem eu nibh adipiscing ultricies nec at lacus. Cras laoreet ultricies sem, at blandit mi eleifend aliquam. Nunc enim ipsum, vehicula non pretium varius, cursus ac tortor. Vivamus fringilla congue laoreet. Quisque ultrices sodales orci, quis rhoncus justo auctor in. Phasellus dui eros, bibendum eu feugiat ornare, faucibus eu mi. Nunc aliquet tempus sem, id aliquam diam varius ac. Maecenas nisl nunc, molestie vitae eleifend vel, iaculis sed magna. Aenean tempus lacus vitae orci posuere porttitor eget non felis. Donec lectus elit, aliquam nec eleifend sit amet, vestibulum sed nunc. </p> </div> Hope someone can help, as I'm only just learning jquery/javascript just now and I know this is all very hacked together. Thanks in advance!
0
[ 2, 12251, 5309, 27, 8294, 19, 1143, 2331, 1513, 800, 3726, 3726, 13416, 737, 235, 92, 448, 55, 187, 31, 22, 79, 749, 20, 309, 71, 12251, 5309, 86, 76, 14, 2741, 6486, 19069, 32, 9412, 109, 19, 1143, 2331, 9, 207, 31, 92, 22, 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...
Multiple inheritence and C# === Let's say I have two base abstract classes with completely different functionality: Laptop and Smartphone. (Suppose the functionality is completely different). And in my current project I had already many implementations of laptops and smartphones, and they always were completely different. But suddenly I received a request to add a class that is an implementation of pc-tablet, that is actually have functions of both smartphone and laptop. It is too late to change the base classes, and actually I'm very sure that this pc-tablet will appear only once. The problem is, I should be able to contain my pc-tablet in the conainer for smartphones, but it should also be laptop, because of the inherited functionality (actually beside that, in some part of the project pc-tablet is used only as laptop, and it doesn't need smartphone functionality. Moreover it is bad to look at pc-tablet as smartphone for that particular part of the project). So I have PcTabletAsLaptop : Laptop class, that is actually a laptop, and not a smartphone. My solution is to add a wrapper: class PcTablet : SmartPhone { private PcTabletAsLaptop _pcTablet; // Here goes all the methods of PcTabletAsLaptop as proxies: public void Call(int number) { _pcTablet.Call(number); } // ..... } There are 200+ methods and I want them to be generated automatically from PcTabletAsLaptop. This solution looks quite complicated. My question is it good, or maybe there are some simplier ways to do that?
0
[ 2, 1886, 17569, 2940, 17, 272, 5910, 800, 3726, 3726, 408, 22, 18, 395, 31, 57, 81, 1000, 8502, 2684, 29, 1524, 421, 18548, 45, 12294, 17, 21421, 9, 13, 5, 18, 576, 15690, 14, 18548, 25, 1524, 421, 6, 9, 17, 19, 51, 866, 669, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 setOnTouchListener === I have read some difference response for this same question, so I dont know which one is right, then I decided to ask it again. Please try to not refer any other link in this answer, if you wanna do so, I will be expecting a bit of extra explanation. My question is: I have an ImageView inside a ViewPager, my image view has some gestures detection(zoom and pan) and I am using the default ViewPager, which has swipe detection by default. **How`s the chain of onTouch events works? the lowest view in my hierarchy will always get onTouch and if the method returns false the parent will handle it? or the opposite?** I am asking that, because I have a ImageView which has gestures to left and right, and when I get in the edge of the image, I have to dispatch an event to the parent(ViewPager) to handle the pagination event. any further tip in how to do it, it will be really appreciated. Thanks
0
[ 2, 13005, 309, 218, 15725, 13891, 106, 800, 3726, 3726, 31, 57, 1302, 109, 2841, 1627, 26, 48, 205, 1301, 15, 86, 31, 1049, 143, 56, 53, 25, 193, 15, 94, 31, 868, 20, 1349, 32, 188, 9, 2247, 1131, 20, 52, 5017, 186, 89, 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...
FTP org.apache.commons.net.MalformedServerReplyException: Could not parse response code === I'm having an issue trying to FTP a file to our server everyday. Here is the response from the server... org.apache.commons.net.MalformedServerReplyException: Could not parse response code. Server Reply: ma. I'm not sure what the server reply 'ma' means? I can log in using a client like Filezilla no problem. FTPClient client = new FTPClient(); try { client.connect("IP Address"); boolean login = client.login("username", "password"); if (login) { do something } } catch (IOException e) { e.printStackTrace(); out.println(e.toString()); } finally { try { client.disconnect(); } catch (IOException e) { e.printStackTrace(); out.println(e.toString()); } } Thanks for any suggestions.
0
[ 2, 1187, 306, 13, 5583, 9, 7738, 2569, 9, 17130, 18, 9, 2328, 9, 3482, 12609, 10321, 106, 99, 306, 102, 10066, 872, 45, 110, 52, 2017, 870, 1627, 1797, 800, 3726, 3726, 31, 22, 79, 452, 40, 1513, 749, 20, 1187, 306, 21, 3893, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Displayed Jquery variable doesn't change when the Variable Changes === I use this to check for the nubmer of boxes checked var CheckedChecks = $("input:checkbox:checked").length; and then I place that result in a long string of HTML. I have alerts set up so I know that the variable is changing. (I'm having trouble pasting in the html but it doesn't really matter... $(".pt-sel:first").append("HTML CRAP"+ CheckedChecks +"MORE HTML CRAP") All the html is displaying fine and the initial value of 0 for the number of checked boxes is correct however it doesn't update as the variable updates. Both the var and the display of the var occur within the same {} set so that isn't the problem. How do I fix this?
0
[ 2, 6115, 487, 8190, 93, 7612, 1437, 22, 38, 753, 76, 14, 7612, 1693, 800, 3726, 3726, 31, 275, 48, 20, 2631, 26, 14, 3152, 220, 1263, 16, 8120, 6505, 4033, 6505, 12542, 18, 800, 5579, 5, 7, 108, 4881, 45, 12542, 5309, 45, 12542,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
PHP - Mail an exchange server SMTP server response: 550-Verification failed === How do I send an email to my exchange server? When I set the php.ini file with send_from="x@domain.com" it says 550 verification failed. How do I verify myself? I am using SMTP: mail.domain.com Any ideas?
0
[ 2, 13, 26120, 13, 8, 4216, 40, 1950, 8128, 7613, 13726, 8128, 1627, 45, 13, 12763, 8, 2304, 4634, 1702, 800, 3726, 3726, 184, 107, 31, 2660, 40, 8517, 20, 51, 1950, 8128, 60, 76, 31, 309, 14, 13, 26120, 9, 2651, 3893, 29, 2660, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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-ins for creating Sharepoint issue tracking using Outlook? === Does anyone know of any Outlook 2010 add-ins (freeware or code) for tracking issues in Sharepoint 2010? I'm looking for something similiar to - http://assistmyteam.net/TeamHelpdeskSP/
0
[ 2, 3547, 8, 108, 18, 26, 2936, 1891, 3132, 1513, 10353, 568, 19837, 60, 800, 3726, 3726, 630, 1276, 143, 16, 186, 19837, 498, 3547, 8, 108, 18, 13, 5, 4639, 5011, 54, 1797, 6, 26, 10353, 1549, 19, 1891, 3132, 498, 60, 31, 22, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Jquery UI .dialog Opens and Closes Immediately with .click === I have a dialog attached to a link that opens but closes immediately. No js errors in the console. Heres the code: <script type="text/javascript"> $(document).ready( function(){ $( "##des-#pres_id#" ).dialog({ autoOpen: false, show: "blind", hide: "explode" }); $( "##link-des-#pres_id#" ).click(function() { $( "##des-#pres_id#" ).dialog( "open" ); return false; }); } ); </script> <div id="des-#pres_id#" title="Description">#description#</div> #left(description,30)#<cfif len(description) GT 30> <a href="" id="link-des-#pres_id#">more...</a></cfif> What am i missing here? (im using UI ver 1.7.2)
0
[ 2, 487, 8190, 93, 13, 5661, 13, 9, 4286, 5567, 8965, 17, 543, 18, 1375, 29, 13, 9, 150, 10129, 800, 3726, 3726, 31, 57, 21, 28223, 3638, 20, 21, 3508, 30, 8965, 47, 543, 18, 1375, 9, 90, 487, 18, 11908, 19, 14, 8650, 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...
Android Tabs/Fragments lifecycle === As far as tabs/fragments go, is it possible for them to retain information? For example, if I had a tab that upon the first selection made an http call and then displayed information, could I then have it display the information again upon selection without making another http call?
0
[ 2, 13005, 6523, 18, 118, 22133, 6601, 201, 12467, 800, 3726, 3726, 28, 463, 28, 6523, 18, 118, 22133, 6601, 162, 15, 25, 32, 938, 26, 105, 20, 8201, 676, 60, 26, 823, 15, 100, 31, 41, 21, 6523, 30, 685, 14, 64, 3155, 117, 40, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 extract an element of JTextArea === I tried to extract the last line from a JTextArea and set it to a String this is my cod: JTextArea text = new JTextArea(); String text2 = text.getText(); int totalLines = text.getLineCount(); for(int j=0; j < totalLines; j++) { int end = text.getLineEndOffset(j); String line = text2.substring(end); } can someoane tell me where is the mistake? thanks
0
[ 2, 184, 20, 10962, 40, 4520, 16, 487, 11969, 17760, 800, 3726, 3726, 31, 794, 20, 10962, 14, 236, 293, 37, 21, 487, 11969, 17760, 17, 309, 32, 20, 21, 3724, 48, 25, 51, 14395, 45, 487, 11969, 17760, 1854, 800, 78, 487, 11969, 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...
Pass value to jquery dialog === I've got an asp.net gridview wrapped around an update panel with say two fields: <asp:TemplateField Visible="False"> <ItemTemplate> <asp:Label ID="lblID" runat="server" style="display:none" Text='<%# DataBinder.Eval(Container, "DataItem.ID") %>' Width=".05px"></asp:Label> </ItemTemplate> <ItemStyle Width="1%" /> <ControlStyle Width="0px" /> <HeaderStyle Width="0px" /> </asp:TemplateField> <asp:TemplateField HeaderText="#"> <ItemTemplate> <asp:HyperLink ID="hlSortOrder" runat="server" CssClass="hlDialog" NavigateUrl="javascript:return false;" Text='<%# DataBinder.Eval(Container, "DataItem.SortOrder") %>'></asp:HyperLink> </ItemTemplate> <FooterStyle HorizontalAlign="Center" /> <HeaderStyle HorizontalAlign="Center" /> <ItemStyle HorizontalAlign="Center" /> </asp:TemplateField> The second field is a hyperlink field where when I click on it I can open up the jquery ui dialog box. I call it like so: $(".hlDialog").click(function () { $('#dialog').dialog({ draggable: true, modal: true, height: 600, width: 800, title: "Log file", open: function (type, data) { $(this).parent().appendTo("form"); } }); }); This works fine however...Is it possible to pass the value of my first gridview (from above) `lblID` to the jquery dialog box? Right now I am just pulling up an empty dialog screen. I'd like to be able to eventually take the value of lblID (from the gridview above) and then pull some data to display on my dialog box. Is this possible?
0
[ 2, 1477, 1923, 20, 487, 8190, 93, 28223, 800, 3726, 3726, 31, 22, 195, 330, 40, 28, 306, 9, 2328, 7354, 4725, 3684, 140, 40, 11100, 4113, 29, 395, 81, 2861, 45, 13, 1, 472, 306, 45, 9577, 6554, 1109, 4560, 3726, 7, 13192, 870, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 come I cannot access the public enum of another class as a static field? === I have an enum in a file: goog.provide('animals.Fish'); animals.Fish = function(obj) { this.name_ = obj[animals.Fish.Properties.NAME]; this.awesomenessLevel_ = obj[animals.Fish.Properties.AWESOMENESS]; } /** * Public list of properties. * @enum {string} */ animals.Fish.Properties = { NAME: 'name', AWESOMENESS: 'awesomenessLevel', } How come I can't access this enum as a static field of Fish in another class like this? goog.require('animals.Fish'); ... var tuna = new animals.Fish( animals.Fish.NAME: 'tuna', animals.Fish.AWESOMENESS: '100' ) ...
0
[ 2, 184, 340, 31, 1967, 1381, 14, 317, 1957, 723, 16, 226, 718, 28, 21, 12038, 575, 60, 800, 3726, 3726, 31, 57, 40, 1957, 723, 19, 21, 3893, 45, 162, 5598, 9, 26735, 5, 22, 25480, 18, 9, 4934, 22, 6, 73, 2522, 9, 4934, 800, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
PHP. How to use function result as variable? === This function returns url: `<?php get_theme_url(); ?>`. How can I use it as variable? I've tried this code, but it doesn't work: <?php $a = get_theme_url(); $files = glob( '$a/tariffs/tariff-b*.php' ); foreach( $files as $file ) { include( $file ); echo $tariff_about; ?> I'm sorry for newbie being :-).
3
[ 2, 13, 26120, 9, 184, 20, 275, 1990, 829, 28, 7612, 60, 800, 3726, 3726, 48, 1990, 4815, 287, 6362, 45, 13, 1, 60, 26120, 164, 1, 124, 790, 1, 911, 255, 5, 6, 73, 13, 60, 1, 9, 184, 92, 31, 275, 32, 28, 7612, 60, 31, 22,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
ManyRelatedManager call returns empty list when it should return at least one result === I have two models designated for tracking what users have upvoted an Article instance (in another app, in this case `articlescraper`). from django.contrib.auth.models import User class UserProfile(models.Model): user = models.OneToOneField(User) articles_upvoted = models.ManyToManyField('useraccounts.UpvotedArticle', null=True, blank=True) class UpvotedArticle(models.Model): article = models.ForeignKey('articlescraper.Article') user = models.ForeignKey(User) In a Django shell, I've tried to get a list of articles by interacting with `UserProfile`: a = UserProfile.objects.get(pk=1) a.articles_upvoted.all() Which returns: [] However, then I went a little further: b = UpvotedArticle.objects.filter(user=User.objects.get(pk=1)) b Which returns: [<UpvotedArticle: Arch Linux Lexmark S305 Drivers>, <UpvotedArticle: Structure of a Haystack project>] Which is the expected behavior, and is mirrored in the Django admin in both `UserProfile` and `UpvotedArticle` categories. I don't understand, however, why attempting to get a list of articles can't be done the way I initially tried to using `a.articles_upvoted.all()` if the two models are linked.
0
[ 2, 151, 6203, 22256, 645, 4815, 2424, 968, 76, 32, 378, 788, 35, 639, 53, 829, 800, 3726, 3726, 31, 57, 81, 2761, 3232, 26, 10353, 98, 3878, 57, 71, 28195, 43, 40, 2002, 4851, 13, 5, 108, 226, 4865, 15, 19, 48, 610, 13, 1, 2...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Synchronized data read/write to/from main memory === When a synchronized method is completed, will it push only the data modified by it to main memory, or all the member variables, similarly when a synchronized method executes, will it read only the data it needs from main memory or will it clear all the member variables in the cache and read their values from main memory ? For example public class SharedData { int a; int b; int c; int d; public SharedData() { a = b = c = d = 10; } public synchronized void compute() { a = b * 20; b = a + 10; } public synchronized int getResult() { return b*c; } } In the above code assume compute is executed by threadA and getResult is executed by threadB. After the execution of compute, will threadA update main memory with a and b or will it update a,b,c and d. And before executing getResult will threadB get only the value of b and c from main memory or will it clear the cache and fetch values for all member variables a,b,c and d ?
0
[ 2, 27202, 1054, 1302, 118, 23716, 20, 118, 2665, 407, 1912, 800, 3726, 3726, 76, 21, 27202, 2109, 25, 1066, 15, 129, 32, 3250, 104, 14, 1054, 5372, 34, 32, 20, 407, 1912, 15, 54, 65, 14, 322, 12157, 15, 5843, 76, 21, 27202, 2109...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Inserting new node in html document in c# === I am trying to insert new node in the document using htmlagilitypack. I am reading the document from the stream , insert the node and then return the document as a FileContentResult object : HtmlDocument ndoc = new HtmlDocument(); ndoc.Load(stream); HtmlNode usern = HtmlNode.CreateNode("<img .... />"); usern.Attributes.Add("onclick", "javascript:document.location.href='/Home/Index';"); ndoc.DocumentNode.SelectSingleNode("id('main')").AppendChild(usern); using (MemoryStream ms = new MemoryStream()) { ndoc.Save(ms); ms.Seek(0, System.IO.SeekOrigin.Begin); fileBytes = ms.ToArray(); } FileContentResult file = File(fileBytes, "text/html"); return file; **Problem :** New node ( img ) is not inserting. My footer content gone if i am using this code and if i just read the document from the stream and return as a FileContentResult then everything perfect. I want to know whats the problem with this code or where i am doing wrong ?
0
[ 2, 14692, 68, 78, 15421, 19, 13, 15895, 4492, 19, 272, 5910, 800, 3726, 3726, 31, 589, 749, 20, 14692, 78, 15421, 19, 14, 4492, 568, 13, 15895, 3302, 20901, 8573, 9, 31, 589, 1876, 14, 4492, 37, 14, 3766, 13, 15, 14692, 14, 1542...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Internet Explorer DNS, Cache === I was hoping someone may be able to help me out with a specific IE issue as Im unable to replicate within my VMWare. I recently changed an IP address of a site that I host. In the short time while I was getting the DNS records updated the client has viewed the website using Internet Explorer. The server has responded with its standard "Website misconfig issue, possible cause IP changed." (thats the short version) The DNS was updated, the site is again viewing correct however and the client is still seeing the error message. What I have done: Asked them to hit F5 Clear browser cache Ipconfig /flushdns I asked them to ping the domain and it responds back with the new IP address. Access the site via IP - can see the new site. Click on a menu item and they can go to any page, but when they go to the homepage "error page appears again" Im at a lose at the moment.
0
[ 2, 2620, 8520, 13, 43, 2172, 15, 16522, 800, 3726, 3726, 31, 23, 3935, 737, 123, 44, 777, 20, 448, 55, 70, 29, 21, 1903, 13, 660, 1513, 28, 797, 2343, 20, 22156, 363, 51, 13, 20147, 5011, 9, 31, 1989, 1015, 40, 15735, 3218, 16...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Add child category to multiple parent category in Magento === I want to assign a specific child category to multiple parent categories . For e.g, If there are 2 parent categories ,say, Dell Laptop and Sony Laptop and a child category named as Laptop accessories. I want to include the "Laptop Accessories" category in both "Dell Laptop" and "Sony Laptop" . By default,this functionality is not in Magento, I need to create 2 child categories named as "Laptop accessories" and then assign it to parent categories. How can I solve this issue? Does any have worked on it? Thanks in advance!
0
[ 2, 3547, 850, 3230, 20, 1886, 4766, 3230, 19, 4723, 17050, 800, 3726, 3726, 31, 259, 20, 13952, 21, 1903, 850, 3230, 20, 1886, 4766, 6422, 13, 9, 26, 13, 62, 9, 263, 15, 100, 80, 50, 172, 4766, 6422, 13, 15, 6366, 15, 13, 5491...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
complex sql statement to different rows === i have a simple table which have 4 fields indexID UserID text_1 IsFinal this table may have multi value for each UserID and IsFinal field can have only single value 1 Or 0 what im trying to do is to make a select statement which will return the users ID's if IsFinal only equal 0 the problem there may be multi records for the same userID one have IsFinal equal 0 and only 1 which IsFinal equal 1 my problem here that i want ignore all of records for the ID if it have record with Isfinal equal 1 i want ignore all record since it have a record with Isfinal equal 1 i don't know if that can be done by SQL statement only or not Thank you
0
[ 2, 1502, 4444, 255, 3331, 20, 421, 11295, 800, 3726, 3726, 31, 57, 21, 1935, 859, 56, 57, 268, 2861, 4348, 1340, 275, 5175, 1854, 1, 165, 25, 4932, 48, 859, 123, 57, 1889, 1923, 26, 206, 275, 5175, 17, 25, 4932, 575, 92, 57, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
displaying the session variable in the jquery colorbox === i'm using a jquery colorbox in my site, and the content i displayed in that colorbox is as follows: <form id="form1" name="form1" method="POST" onsubmit="return false"> <div style="text-align:center; font:17px verdana; color: #17375E;">Email a friend about Snappy Sign Up</div> <div style="float:left;"> <div class="ma_block basic" style="background:none;"> <div class="ma_form_line" style="width: 125%;padding-top: 50px;"> <label style="width: 155px;padding-right:10px;padding-top: 3px;">Your Name </label> <input type="text" name="name" id="name" value="<?php echo($page_name." ".$page_name);?>" class="inputtext2"/> </div> </div> <div class="ma_block basic" style="background:none;"> <div class="ma_form_line" style="width: 125%;"> <label style="width: 155px;padding-right:10px;padding-top: 5px;">Friend's Email address </label> <div class="ta-content-m" style="width: 250px;float: left;min-height: 20px;"> <input name="email" id="email" class="inputtext2" style="width: 240px;height:20px;float: left;font:12px verdana;"></input> </div> </div> </div> <div class="clr"></div> <div class="ma_block basic"> <div class="ma_form_line" style="width: 125%;"> <label style="width: 155px;padding-right:10px;">Message</label> <div class="ta-content-m"style="float: left;min-height: 50px;width: 250px;"> <textarea name="message" id="message" class="plainfield p-textarea tawatermark" style="width: 240px;float: left;max-height: 240px;height: 150px;color:#D9D9D9;max-width: 240px;font:12px verdana;" rows="5"></textarea> </div><div class="clr"></div><a href="#"> <div id="emailfrnd_submit" style="width: 50px;float: right;"> <input type="submit" value="Send" name="emailfrnd_submit" id="emailfrnd_submit" class="redbut" style="float:right;position:absolute;right: 120px;margin-top: 5px;"> </div> </a> </div> </div> <div style="width: 50px;float: right;"> <button name="emailfrnd_submit" id="colorboxCloseBtn" class="redbut" style="float:right;position:absolute;right: 200px;margin-top: 80px;onClick="$.colorbox.close();">Done</button> </div> </div> </form> and the following is the php session i included in my page: <?php if(!isset($_SESSION)) { session_start(); } if(isset($_SESSION['user']) && $_SESSION['user']!="") { require_once('../services/services.php'); require_once('../nondbfunc/nondbfunc.php'); $user_data=db_func::getUserByEmail($_SESSION['user']); $name=$user_data["First_name"]; $lname=$user_data["Last_name"]; } else{ /* header("Location: ../index.php"); */ } $page_name="emailfrnd"; ?> here i succeeded in bring this content in my colorbox, now here what i want is to display the username that is set by the session in this colorbox, when i used another variable ie.,$page_name in the colorbox it is showing, but when i used "<?php echo($name);?>" in my input field value in the colorbox content, the session value is not displaying in my input field. How to handle this problem?? thanks in advance.
0
[ 2, 17418, 14, 3723, 7612, 19, 14, 487, 8190, 93, 1665, 5309, 800, 3726, 3726, 31, 22, 79, 568, 21, 487, 8190, 93, 1665, 5309, 19, 51, 689, 15, 17, 14, 2331, 31, 6115, 19, 30, 1665, 5309, 25, 28, 2415, 45, 13, 1, 4190, 4924, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Single marker stuck beneath polygon in Fusion Tables layer === So this strikes me as, perhaps, a really obscure bug. I'm working on a map for the upcoming Quebec election. You can see it here: http://demarchy.ca/qc2012 So I built a fusion table with all the riding polygons, and I've begun adding points for ridings of interest. They all work fine - except one. If you zoom in on the area around Montreal (Laval, specifically) there's one blue dot that is stuck behind a red polygon and it simply isn't clickable. I've tried screwing around with the zindex for all the markers, but haven't had much luck. Here's what I'm doing: var layer = new google.maps.FusionTablesLayer({ query: { select: 'Geocodable address', from: '4722124' }, styles: [{ markeroptions: { zindex: 1, } }, { polygonOptions: { zindex: 2, } }] }); layer.setMap(map); } Beyond that, I'm not entirely sure what to do. The rest of the markers work fine. Currently, I'm just plugging the points manually into the fusion table. Should I drop them using CSS and edit the zindex that way? (Assuming this is just a glitch and there's no other solution.) Thanks!
0
[ 2, 345, 13289, 4549, 2550, 21309, 19, 11117, 7484, 5385, 800, 3726, 3726, 86, 48, 9880, 55, 28, 15, 1774, 15, 21, 510, 15472, 6256, 9, 31, 22, 79, 638, 27, 21, 2942, 26, 14, 9078, 4107, 776, 9, 42, 92, 196, 32, 235, 45, 7775, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
.htaccess Why does this break my directory password protection? === This is my .htaccess file inside my `public_html` folder: # prepend http://www. RewriteEngine On RewriteCond %{HTTP_HOST} !^www\. RewriteCond %{HTTP_HOST} !^m\. RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L] # down for maintenance RewriteBase / RewriteCond %{REMOTE_ADDR} !=76.21.110.93 RewriteCond %{REQUEST_URI} !^/down\.php$ RewriteRule ^(.*)$ http://(..mysite..).com/down.php [R=307,L] # remove '/index.php' RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php?$1 [L,QSA] RewriteCond %{THE_REQUEST} ^[A-Z]{3,}\s(.*)/index\.php [NC] RewriteRule ^ /%1 [R=301,L] If I browse to `mysite.com/admin` I get a 401 error message (I actually get redirected to my main index page, but the url is `www.mysite.com/401.shtml`) If i delete this .htaccess file then I don't get this error. What part of this file is causing my entire site to screw up?
0
[ 2, 13, 9, 9020, 20604, 483, 630, 48, 1442, 51, 16755, 20884, 2057, 60, 800, 3726, 3726, 48, 25, 51, 13, 9, 9020, 20604, 3893, 572, 51, 13, 1, 12259, 1, 15895, 1, 19294, 45, 6926, 15884, 2451, 7775, 6903, 6483, 9, 27891, 16847, 2...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
whether cover flow accepted in app store === I have ipmlemented coverflow in my app using http://chaosinmotion.com/flowcover.m. Whether it is accepted in app store
2
[ 2, 1472, 1227, 3312, 2217, 19, 4865, 1718, 800, 3726, 3726, 31, 57, 31, 5576, 413, 1130, 69, 1227, 9990, 19, 51, 4865, 568, 7775, 6903, 1651, 759, 108, 15745, 9, 960, 118, 9990, 14069, 9, 79, 9, 1472, 32, 25, 2217, 19, 4865, 171...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
Identifing module(s) of memory leak === I have a win32 process that hosts some modules implemented in C. Each module is implemented in a DLL. The modules interact and share some memory objects. I notice a memory leak in that process. There are several heaps allocated in that process. Only two heaps grow during runtime. How can I detect which module has allocated objects on that specific heap? I have only the source code for a few of the modules. So I can't instrument each and every modules. What are means to identify the allocating module?
0
[ 2, 13, 13384, 821, 68, 12613, 5, 18, 6, 16, 1912, 11724, 800, 3726, 3726, 31, 57, 21, 628, 3125, 953, 30, 5397, 109, 17113, 6807, 19, 272, 9, 206, 12613, 25, 6807, 19, 21, 13, 43, 211, 9, 14, 17113, 10001, 17, 1891, 109, 1912,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Is this code a proper MVC architecture? === I am learning MVC patterns. I have created this very simple code as a demo. The target of the code is simple. I have created a car object which has a initial speed of 95 miles per hour. there are 1 label to show the current speed, 2 buttons. increase and decrease speed. on clicking each of the buttons, the screen shows the modified speed. once the speed reaches 100, the increase button is disabled. once the speed is decreased below 100, the increase button is enabled again. this is the codes for my Model, View and Controller. Interface IModel ----------------------- public interface IModel { int getCurrentSpeed(); int increaseSpeed(); int decreaseSpeed(); void updateObserver(); void setView(IView objView); } Class carModel (concrete class from IModel) -------------------------------------------- public class carModel : IModel { private IView objLocalView; private int currentSpeed; //Constructor public carModel(int carSpeed) { this.currentSpeed = carSpeed; } public void setView(IView objView) { objLocalView = objView; } public void setObjView(IView objView) { objLocalView = objView; } public int increaseSpeed() { currentSpeed++; updateObserver(); return currentSpeed; } public int decreaseSpeed() { currentSpeed--; updateObserver(); return currentSpeed; } public void updateObserver() { objLocalView.updateStatus(this); } public int getCurrentSpeed() { return currentSpeed; } } Interface IController ----------------------------- public interface IController { void requestIncreaseSpeed(); void requestDecreaseSpeed(); } Class carController (concrete class from IController) ---------------------------------------------------------- public class carController : IController { private IModel objLocalModel; private IView objLocalView; //constructor public carController(IModel objModel, IView objView) { objLocalView = objView; objLocalModel = objModel; objLocalModel.setView(objView); } public void requestIncreaseSpeed() { int modifiedSpeed = objLocalModel.increaseSpeed(); checkSpeedLimit(modifiedSpeed); } public void requestDecreaseSpeed() { int modifiedSpeed = objLocalModel.decreaseSpeed(); checkSpeedLimit(modifiedSpeed); } public void checkSpeedLimit(int modifiedSpeed) { if (modifiedSpeed > 100) { objLocalView.disableIncreaseSpeed(); } else { objLocalView.enableIncreaseSpeed(); } } } interface IView ------------------------ public interface IView { void enableIncreaseSpeed(); void disableIncreaseSpeed(); void updateStatus(IModel objModel); } form1.cs (the view class which users will see) ------------------------------------------------------ public partial class Form1 : Form, IView { private IModel objModel; private IController objController; public Form1() { InitializeComponent(); } private void Form1_Load(object sender, EventArgs e) { objModel = new carModel(96); objController = new carController(objModel, this); updateStatus(objModel); } public void enableIncreaseSpeed() { btnIncrease.Enabled = true; } public void disableIncreaseSpeed() { btnIncrease.Enabled = false; } public void updateStatus(IModel objModel) { lblCurrentSpeed.Text = ""; lblCurrentSpeed.Text = objModel.getCurrentSpeed().ToString(); } private void btnIncrease_Click(object sender, EventArgs e) { objController.requestIncreaseSpeed(); } private void btnDecrease_Click(object sender, EventArgs e) { objController.requestDecreaseSpeed(); } } I am not sure if this is a proper MVC design? because I cant see much differences from a regular 3 tier architecture (apart from the Model and View are communicating here, which does not happen in 3 tier architecture)
0
[ 2, 25, 48, 1797, 21, 4119, 307, 8990, 2607, 60, 800, 3726, 3726, 31, 589, 2477, 307, 8990, 6282, 9, 31, 57, 679, 48, 253, 1935, 1797, 28, 21, 8376, 9, 14, 2935, 16, 14, 1797, 25, 1935, 9, 31, 57, 679, 21, 349, 3095, 56, 63, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 an Int value to an angle === How can we convert an Int value to an angle. int speed = remoteService.getSpeed(); I am getting the speed value from a remote service and I want to convert it to an angle. How can I do this? Any Idea?
0
[ 2, 8406, 40, 19, 38, 1923, 20, 40, 5334, 800, 3726, 3726, 184, 92, 95, 8406, 40, 19, 38, 1923, 20, 40, 5334, 9, 19, 38, 1362, 800, 5388, 11449, 9, 3060, 6708, 5, 6, 73, 31, 589, 1017, 14, 1362, 1923, 37, 21, 5388, 365, 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 the location of a color on the screen === in java, is there any way i can find the location of a color on the screen? so if i know what the color is i get get the current location of it? i can use the robot class to get a specific color but i need to be able to locate the color on the screen where ever it is. if this cannot be done with robot or anouther class, i would appresiate it if someone could point me in the right direction by telling me what i need to do. thanks if so could anyone please help me with what api to use or how to do it?
0
[ 2, 164, 14, 1474, 16, 21, 1665, 27, 14, 2324, 800, 3726, 3726, 19, 8247, 15, 25, 80, 186, 161, 31, 92, 477, 14, 1474, 16, 21, 1665, 27, 14, 2324, 60, 86, 100, 31, 143, 98, 14, 1665, 25, 31, 164, 164, 14, 866, 1474, 16, 32,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Agrregate root, Factory and partial aggregate === I have an aggregate root called `Configuration` which represent's all the options configured for a particular provisioned customer on a multi-tenant application. Since there are lot of options to be configured, the user generally follows a series of steps (through wizards) and then sometimes wants to partially save the data to be completed later (may be next day). I am familiar with the `Factory` concept and one of its rule is **not** to enabled creation of partial aggregate objects if they fail the invariant rules. My question is how to solve the **partial object** use-case?
0
[ 2, 21, 8807, 99, 3322, 5900, 15, 3129, 17, 7284, 8544, 800, 3726, 3726, 31, 57, 40, 8544, 5900, 227, 13, 1, 1126, 13549, 857, 1, 56, 3501, 22, 18, 65, 14, 6368, 28895, 26, 21, 1498, 8738, 69, 7705, 27, 21, 1889, 8, 1316, 1830,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 search a telerik radgrid wpf with large data === I have a telerik RadGRid wpf it has the columns studentID, Marks, Status usually it contains large data. A dropdownlist is added beside the telerik grid it contains all the student Ids, when user selects a particular studentId and click the button Go(which is added under the dropdownlist) the grid should show only the rows with the same studentId. How to do this we are following MVVM Prism Pattern
0
[ 2, 184, 20, 2122, 21, 4338, 6639, 4944, 16375, 619, 7721, 29, 370, 1054, 800, 3726, 3726, 31, 57, 21, 4338, 6639, 4944, 16375, 619, 7721, 32, 63, 14, 7498, 1209, 1340, 15, 4872, 15, 1782, 951, 32, 1588, 370, 1054, 9, 21, 2804, 2...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
strange issue with select command in mysql === I run the following query in mysql console: select * from has where tweetId <= 32344308065509376 AND tweetId >= 31486746491363330 but record with tweetId=32342160586047488 is not in the result set!!!!! but it exists in table "has"! anybody can help me overcome this strange problem? thanks
0
[ 2, 2578, 1513, 29, 5407, 1202, 19, 51, 18, 22402, 800, 3726, 3726, 31, 485, 14, 249, 25597, 19, 51, 18, 22402, 8650, 45, 5407, 1637, 37, 63, 113, 20224, 1340, 13, 1, 3726, 2512, 25952, 22992, 3370, 12763, 4069, 4436, 17, 20224, 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...
Requesting suggestions for an audio processing project in linux === I have been an avid user for dfx sound processing widget on windows for quit a while, since i switched to ubuntu I am missing that. So I plan to create a sound processing widget for ubuntu. Idea : A small widget may run in the taskbar, on click it would show a small window with some settings. Any sound coming from any application may be tweaked using this. Requirement : 1. Please suggest resources for any c++ library for sound processing(My pick is openal) 2. Please suggest resources for creating gui in ubuntu. 3. Any other suggestions , if you have :)
4
[ 2, 20033, 18389, 26, 40, 4023, 5511, 669, 19, 13024, 800, 3726, 3726, 31, 57, 74, 40, 19613, 4155, 26, 13, 43, 16488, 646, 5511, 4807, 43, 3060, 27, 1936, 26, 6489, 21, 133, 15, 179, 31, 6667, 20, 287, 12968, 2473, 31, 589, 2863...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Override Twenty Eleven Theme Option Link Color Style === I am attempting to override the function (in an upgrade safe manner) twentyeleven_print_link_color_style which is found on line 378 of wp-content/themes/twentyeleven/inc/theme-options.php I tried the following in my child themes functions.php, but twentyeleven_print_link_color_style is still firing (I can see the css it is outputting). add_action( 'after_setup_theme', 'goodbye_inline_css' ); function goodbye_inline_css() { remove_filter( 'wp_head', 'twentyeleven_print_link_color_style' ); }
0
[ 2, 84, 11891, 1309, 4254, 3184, 4255, 3508, 1665, 1034, 800, 3726, 3726, 31, 589, 6314, 20, 84, 11891, 14, 1990, 13, 5, 108, 40, 9483, 1834, 3832, 6, 1309, 532, 4943, 1, 10299, 1, 6258, 1, 11282, 1, 4381, 56, 25, 216, 27, 293, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How to get the number of Processors on Windows Phone === I'm wondering how to get the number of processors on Windows Phone... as documented in the MSDN the following statement always throws a MethodAccessException: Environment.ProcessorCount Any help would be appreciated. Thanks, j3d
0
[ 2, 184, 20, 164, 14, 234, 16, 21034, 27, 1936, 1132, 800, 3726, 3726, 31, 22, 79, 5712, 184, 20, 164, 14, 234, 16, 21034, 27, 1936, 1132, 9, 9, 9, 28, 8926, 19, 14, 4235, 43, 103, 14, 249, 3331, 550, 13566, 21, 2109, 20604, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Which kind of representation can be '\r\x00\x00\x00' (if usually I have hexadecimal code:'\x0\x00\x00\x03') === I'm using a program (klee) that give me tests of c code. I need to use the results in my program. It is not readable information, but some of the solutions are hexadecimal data with the next format: '\x0e\x00\x00\x00' I have already asked about how to convert it into integer, and I found the solution. I will have to introduce this kind of results in structs too, I will know the size but any about the fields or anything else about it. I think I can solve this but now the problem is that sometimes you can obtain things like: '\n\x00\x00\x00'= 13 or '\r\x00\x00\x00' = 10 And I didn't found which kind of representation they use to convert it in readable information.. Apparently I could solve this in python with: import struct selection = struct.unpack('<L', '\r\x00\x00\x00') I don't have any idea of pyton, and I would like found a solution in java or c. Thanks very much
0
[ 2, 56, 825, 16, 5442, 92, 44, 13, 22, 1, 139, 1, 396, 2032, 1, 396, 2032, 1, 396, 2032, 22, 13, 5, 821, 951, 31, 57, 24, 6791, 9522, 49, 3482, 1797, 45, 22, 1, 396, 387, 1, 396, 2032, 1, 396, 2032, 1, 396, 3601, 22, 6, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Wireshark: Filter by Multicast in GUI === Using the Wireshark "Filter" field in the Wireshark GUI, I would like to filter capture results so that only multicast packets are shown. I've seen [this post][1] but that doesn't work for the GUI filter field. [This Wireshark page][2] shows how to filter out multicast, but not how to filter everything *but* multicast. Does anyone know of a simple statement that will do this? Thank you in advance! [1]: http://stackoverflow.com/questions/9728285/sending-multicast-udp-by-gcdasyncudpsocket-fails-no-activity-in-wireshark [2]: http://wiki.wireshark.org/CaptureFilters
0
[ 2, 6511, 28178, 45, 11945, 34, 1889, 6146, 19, 9457, 800, 3726, 3726, 568, 14, 6511, 28178, 13, 7, 11924, 815, 7, 575, 19, 14, 6511, 28178, 9457, 15, 31, 83, 101, 20, 11945, 3683, 1736, 86, 30, 104, 1889, 6146, 12795, 18, 50, 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...
SOAP client with Ruby and Savon: How to add EncodingType attribute in Nonce element === I need to create a ruby web service client(with Savon) to make a soap call to a web service which requires the EncodingType in the Nonce. So the correct soap message will have the Nonce element like this: ...... <wsse:Nonce EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary">SomeHashValue</wsse:Nonce> ...... But in my Savon client, I don't know how to add that attribute in the Nonce element. My code here: ...... client = Savon.client do wsdl.endpoint = "http://webservicehost/TestWebService" wsdl.namespace = "namespace" wsse.credentials "username", "password" wsse.digest = "true" end client.request :get_service do |soap| soap.input = [ "GetService", { "xmlns" => "namespace" } ] soap.body = { "locale" => "en_US", "serviceID" => '123' } end ...... and the Nonce in the generated SOAP message is like: ...... <wsse:Nonce>SomeHashValue</wsse:Nonce> ...... So my question is, how to add the attribute EncodingType to the Nonce element, without changing/removing the SomeHashValue in the Nonce element?
0
[ 2, 6447, 6819, 29, 10811, 17, 13, 18, 11511, 45, 184, 20, 3547, 19608, 4474, 35, 14755, 19, 90, 6175, 4520, 800, 3726, 3726, 31, 376, 20, 1600, 21, 10811, 2741, 365, 6819, 5, 1410, 13, 18, 11511, 6, 20, 233, 21, 6447, 645, 20, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Glassfish HTTP and HTTPS combine === i have a web application (e-trade). Normal pages uses http protokol. I must do some https activated pages. My question is, how i can arrange the Glassfish server, this pages use http , those pages use https, How can i implements this idea on Glassfish server or with alternative configurations.
0
[ 2, 1350, 4934, 7775, 17, 7775, 18, 12287, 800, 3726, 3726, 31, 57, 21, 2741, 3010, 13, 5, 62, 8, 19878, 6, 9, 1826, 4434, 2027, 7775, 9347, 11434, 9, 31, 491, 107, 109, 7775, 18, 9654, 4434, 9, 51, 1301, 25, 15, 184, 31, 92, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
how to create custom widget to change the attribute of xml node in qt?please elaborate ,I am a beginner === I mean like when you click on one node let's take <element> and let's say this is the line in the XML file <element><image src='ktuberling.svg' lang='any' /><pfound src='test.ogg' lang='any' /><word lang='any'>KTuberling</word></element> then I want on the widget area something like type image file ktuberling.svg (with the possibility to load from a file attribute lang any and so on and this changes depending on which element you click Please help I am struck here.
0
[ 2, 184, 20, 1600, 5816, 4807, 43, 3060, 20, 753, 14, 35, 14755, 16, 23504, 15421, 19, 2593, 38, 60, 6744, 7541, 13, 15, 49, 589, 21, 26931, 800, 3726, 3726, 31, 884, 101, 76, 42, 10840, 27, 53, 15421, 408, 22, 18, 247, 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...
Changing from Gson to Jackson for JSON parsing === Im currently using GSON to parse a pretty big JSONfile using an inputstream/reader. The parsing takes about 35 seconds on my android device, i understood from some benchmark test that Jackson performance is way better. But i can't find out how to parse my JSON file using jackson. Can anyone help me? My JSON looks like this: [ { "venue": { … } }, { "venue": { "venue_seasons": [ … ], "address": "the address", "city": "the city", "name": "the name", "created_at": "2011-05-31T07:55:33Z", "latitude": 00.000000, "country": "the country", "internal_link_en": null, "internal_link_nl": null, "updated_at": "2011-09-15T14:46:09Z", "zipcode": "the zipcode", "foursquare_link": "foursquare url", "url": null, "id": 3, "tip": "some tip", "uid": "4ab5e205f964a520317620e3", "phone": "phonenr", "recommended": null, "website": "someurl", "venue_photos": [ … ], //array containing objects with urls of images "description": null, "longitude": 00.000000, "thumbnail_location": null, "subcategories": [ … ], "opening_en": null, "opening_nl": null, "hidden": false, "twitter": "thetwitteraccount", "themes": [ … ] } }, //more venues ] My GSON code looks like this, it works: AssetManager assetManager = getAssets(); InputStream inputStream = null; try { inputStream = assetManager.open("filename.json"); } catch (IOException e) { Log.e("tag", e.getMessage()); } Reader reader = new InputStreamReader(inputStream); Gson gson = new Gson(); List<JsonResponse> venueList = gson.fromJson(reader, new TypeToken<List<JsonResponse>>() {}.getType()); JsonResponse naam = venueList.get(12); String denaam = naam.venue.getName; Log.i("nr12",denaam); Log.i("timetracker","stop" ); // just some logging to test if the parser works for (JsonResponse venue : venueList) { String tijdel = String.valueOf(venue.venue.id); Log.i(venuetag,"name of venue"+ tijdel+ " is: " + venue.venue.getName); } ... class JsonResponse { Venues venue; } class Venues { public List<VenueSeasons> venue_seasons; public List<VenuePhotos> venue_photos; public List<SubCategories> subcategories; public List<Themes> themes; @SerializedName("address") public String getAdress; @SerializedName("city") public String getCity; @SerializedName("country") public String getCountry; @SerializedName("name") public String getName; @SerializedName("created_at") public Date getCreatedAt; @SerializedName("updated_at") public Date getUpdatedAt; @SerializedName("internal_link_nl") public String getInternalLinkNl; @SerializedName("internal_link_en") public String getInternalLinkEN; @SerializedName("latitude") public Double getLatitude; @SerializedName("longitude") public Double getLongitude; @SerializedName("foursquare_link") public String getFoursquareLink; @SerializedName("url") public String getURL; @SerializedName("phone") public String getPhone; @SerializedName("zipcode") public String getZipCode; public String tip; public String tip_en; public String uid; public int id; @SerializedName("website") public String getWebsite; @SerializedName("recommended") public Boolean getRecommended; @SerializedName("description") public String getDescription; @SerializedName("hidden") public Boolean getHidden; @SerializedName("opening_en") public String getOpeningEN; @SerializedName("opening_nl") public String getOpeningNL; @SerializedName("twitter") public String getTwitter; @SerializedName("thumbnail_location") public String getThumbnailLocation; } public class VenuePhotos { @SerializedName("large") public String getLargePhotoURL; @SerializedName("medium") public String getMediumPhotoURL; @SerializedName("small") public String getSmallPhotoURL; @SerializedName("original") public String getOriginalPhotoURL; public String uid; public int id; public int venue_id; public boolean selected; @SerializedName("created_at") public Date getCreatedAt; @SerializedName("updated_at") public Date getUpdatedAt; } Now this works. I did some stuff with the data and after parsing it works all awesome, but I think it sucks the startup of my app takes so long. My Jackson code (the failing one) is: AssetManager assetManager = getAssets(); InputStream inputStream = null; try { inputStream = assetManager.open("originalDelftJson.json"); } catch (IOException e) { Log.e("tag", e.getMessage()); } Reader reader = new InputStreamReader(inputStream); ObjectMapper objectMapper = new ObjectMapper(); JsonFactory jsonFactory = new JsonFactory(); JJsonResponse response = null; try { JsonParser jp = jsonFactory.createJsonParser(reader); response = objectMapper.readValue(jp, JJsonResponse.class); String test = String.valueOf(response.venue.size()); With classes: public class JJsonResponse { public List<JVenue> venue; } public class JVenue { public String name; public int id; public String city; public String address; public String country; public String internal_link_nl; public String internal_link_en; public String zipcode; public String foursquare_link; public String tip_en; public String url; public Date created_at; public Date updated_at; public float latitude; public float longitude; public String tip; public String uid; public String phone; public String recommended; public String website; public String description; public String thumbnail_location; public boolean hidden; public String twitter; public String opening_en; public String opening_nl; } I think i'm pretty close, but im doing something wrong because i get the error : org.codehaus.jackson.map.JsonMappingException: Can not deserialize instance of com.jacksonrecipes.testapp.model.JJsonResponse out of START_ARRAY token I don't really get how the jackson works and how to implement it... Does anyone know how to change my jackson implementation in my android code so it will work and i can acces the data?
0
[ 2, 4226, 37, 489, 528, 20, 2303, 26, 487, 528, 2017, 18, 68, 800, 3726, 3726, 797, 871, 568, 489, 528, 20, 2017, 870, 21, 1772, 580, 487, 528, 16877, 568, 40, 6367, 11260, 118, 10647, 106, 9, 14, 2017, 18, 68, 1384, 88, 2694, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Appending to List On certain Condition === I am trying to make a program, when certain condition is met the value is appended to list. Ex: lets say the last limit is 1000 start the count from 1 if count value is a multiple of 50, append it to a list So the list should have numbers, 50,100,150,200...and so on..I am stuck at the third step, how would i let python know that the value is a multiple of 50 Thanks For Helping Me.
0
[ 2, 4865, 7601, 20, 968, 27, 1200, 2874, 800, 3726, 3726, 31, 589, 749, 20, 233, 21, 625, 15, 76, 1200, 2874, 25, 798, 14, 1923, 25, 4865, 10726, 20, 968, 9, 1396, 45, 6884, 395, 14, 236, 4496, 25, 6150, 799, 14, 2468, 37, 137,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Weblogic clientgen doesn't work from Weblogic === I'm using **clientgen** ant doesk that is a part of Weblogic to generate JAX-WS client from the WSDL. Generated code works very well when I'm using it from the command line and wlfullclient.jar in the classpath. But it doesn't work from ejb that is deployed to the same instance from which wlfullclient.jar wa generated. Error is quite long, and looks like linked to classloaders, that i very annoying because I'm using the same JAVA version and other libraries are coming embedded with WL. Error log is: Any ideas what is wrong? <1341096792539> <BEA-010065> <MessageDrivenBean threw an Exception in onMessage(). The exception was: java.lang.ExceptionInInitializerError. java.lang.ExceptionInInitializerError at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at java.lang.Class.newInstance0(Class.java:355) at java.lang.Class.newInstance(Class.java:308) at javax.xml.ws.spi.FactoryFinder.newInstance(FactoryFinder.java:36) at javax.xml.ws.spi.FactoryFinder.find(FactoryFinder.java:95) at javax.xml.ws.spi.Provider.provider(Provider.java:83) at javax.xml.ws.Service.<init>(Service.java:56) at s.mra.ws.client.proxy.MRADataExchangeService.<init>(MRADataExchangeService.java:115) at s.mra.ws.client.impl.WSMraClient.initialize(WSMraClient.java:222) at s.mra.ws.client.impl.WSMraClient.sendMessageToWS(WSMraClient.java:93) at s.mra.message.router.WSMessageRouterBean.onMessage(WSMessageRouterBean.java:171) at weblogic.ejb.container.internal.MDListener.execute(MDListener.java:466) at weblogic.ejb.container.internal.MDListener.transactionalOnMessage(MDListener.java:371) at weblogic.ejb.container.internal.MDListener.onMessage(MDListener.java:327) at weblogic.jms.client.JMSSession.onMessage(JMSSession.java:4547) at weblogic.jms.client.JMSSession.execute(JMSSession.java:4233) at weblogic.jms.client.JMSSession.executeMessage(JMSSession.java:3709) at weblogic.jms.client.JMSSession.access$000(JMSSession.java:114) at weblogic.jms.client.JMSSession$UseForRunnable.run(JMSSession.java:5058) at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:516) at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201) at weblogic.work.ExecuteThread.run(ExecuteThread.java:173) javax.xml.ws.WebServiceException: Error creating JAXBContext for W3CEndpointReference. at com.sun.xml.ws.spi.ProviderImpl$2.run(ProviderImpl.java:226) at com.sun.xml.ws.spi.ProviderImpl$2.run(ProviderImpl.java:221) at java.security.AccessController.doPrivileged(Native Method) at com.sun.xml.ws.spi.ProviderImpl.getEPRJaxbContext(ProviderImpl.java:221) at com.sun.xml.ws.spi.ProviderImpl.<clinit>(ProviderImpl.java:88) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at java.lang.Class.newInstance0(Class.java:355) at java.lang.Class.newInstance(Class.java:308) at javax.xml.ws.spi.FactoryFinder.newInstance(FactoryFinder.java:36) at javax.xml.ws.spi.FactoryFinder.find(FactoryFinder.java:95) at javax.xml.ws.spi.Provider.provider(Provider.java:83) at javax.xml.ws.Service.<init>(Service.java:56) at s.mra.ws.client.proxy.MRADataExchangeService.<init>(MRADataExchangeService.java:115) at s.mra.ws.client.impl.WSMraClient.initialize(WSMraClient.java:222) at s.mra.ws.client.impl.WSMraClient.sendMessageToWS(WSMraClient.java:93) at s.mra.message.router.WSMessageRouterBean.onMessage(WSMessageRouterBean.java:171) at weblogic.ejb.container.internal.MDListener.execute(MDListener.java:466) at weblogic.ejb.container.internal.MDListener.transactionalOnMessage(MDListener.java:371) at weblogic.ejb.container.internal.MDListener.onMessage(MDListener.java:327) at weblogic.jms.client.JMSSession.onMessage(JMSSession.java:4547) at weblogic.jms.client.JMSSession.execute(JMSSession.java:4233) at weblogic.jms.client.JMSSession.executeMessage(JMSSession.java:3709) at weblogic.jms.client.JMSSession.access$000(JMSSession.java:114) at weblogic.jms.client.JMSSession$UseForRunnable.run(JMSSession.java:5058) at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:516) at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201) at weblogic.work.ExecuteThread.run(ExecuteThread.java:173) javax.xml.bind.JAXBException - with linked exception: [com.sun.xml.bind.v2.runtime.IllegalAnnotationsException: 2 counts of IllegalAnnotationExceptions org.w3c.dom.Element is an interface, and JAXB can't handle interfaces. this problem is related to the following location: at org.w3c.dom.Element at public java.util.List com.sun.xml.ws.developer.MemberSubmissionEndpointReference$Elements.elements at com.sun.xml.ws.developer.MemberSubmissionEndpointReference$Elements at public com.sun.xml.ws.developer.MemberSubmissionEndpointReference$Elements com.sun.xml.ws.developer.MemberSubmissionEndpointReference.referenceProperties at com.sun.xml.ws.developer.MemberSubmissionEndpointReference org.w3c.dom.Element does not have a no-arg default constructor. this problem is related to the following location: at org.w3c.dom.Element at public java.util.List com.sun.xml.ws.developer.MemberSubmissionEndpointReference$Elements.elements at com.sun.xml.ws.developer.MemberSubmissionEndpointReference$Elements at public com.sun.xml.ws.developer.MemberSubmissionEndpointReference$Elements com.sun.xml.ws.developer.MemberSubmissionEndpointReference.referenceProperties at com.sun.xml.ws.developer.MemberSubmissionEndpointReference ] at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:226) at javax.xml.bind.ContextFinder.find(ContextFinder.java:372) at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:574) at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:522) at com.sun.xml.ws.spi.ProviderImpl$2.run(ProviderImpl.java:224) at com.sun.xml.ws.spi.ProviderImpl$2.run(ProviderImpl.java:221) at java.security.AccessController.doPrivileged(Native Method) at com.sun.xml.ws.spi.ProviderImpl.getEPRJaxbContext(ProviderImpl.java:221) at com.sun.xml.ws.spi.ProviderImpl.<clinit>(ProviderImpl.java:88) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at java.lang.Class.newInstance0(Class.java:355) at java.lang.Class.newInstance(Class.java:308) at javax.xml.ws.spi.FactoryFinder.newInstance(FactoryFinder.java:36) at javax.xml.ws.spi.FactoryFinder.find(FactoryFinder.java:95) at javax.xml.ws.spi.Provider.provider(Provider.java:83) at javax.xml.ws.Service.<init>(Service.java:56) at s.mra.ws.client.proxy.MRADataExchangeService.<init>(MRADataExchangeService.java:115) at s.mra.ws.client.impl.WSMraClient.initialize(WSMraClient.java:222) at s.mra.ws.client.impl.WSMraClient.sendMessageToWS(WSMraClient.java:93) at s.mra.message.router.WSMessageRouterBean.onMessage(WSMessageRouterBean.java:171) at weblogic.ejb.container.internal.MDListener.execute(MDListener.java:466) at weblogic.ejb.container.internal.MDListener.transactionalOnMessage(MDListener.java:371) at weblogic.ejb.container.internal.MDListener.onMessage(MDListener.java:327) at weblogic.jms.client.JMSSession.onMessage(JMSSession.java:4547) at weblogic.jms.client.JMSSession.execute(JMSSession.java:4233) at weblogic.jms.client.JMSSession.executeMessage(JMSSession.java:3709) at weblogic.jms.client.JMSSession.access$000(JMSSession.java:114) at weblogic.jms.client.JMSSession$UseForRunnable.run(JMSSession.java:5058) at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:516) at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201) at weblogic.work.ExecuteThread.run(ExecuteThread.java:173) com.sun.xml.bind.v2.runtime.IllegalAnnotationsException: 2 counts of IllegalAnnotationExceptions org.w3c.dom.Element is an interface, and JAXB can't handle interfaces. this problem is related to the following location: at org.w3c.dom.Element at public java.util.List com.sun.xml.ws.developer.MemberSubmissionEndpointReference$Elements.elements at com.sun.xml.ws.developer.MemberSubmissionEndpointReference$Elements at public com.sun.xml.ws.developer.MemberSubmissionEndpointReference$Elements com.sun.xml.ws.developer.MemberSubmissionEndpointReference.referenceProperties at com.sun.xml.ws.developer.MemberSubmissionEndpointReference org.w3c.dom.Element does not have a no-arg default constructor. this problem is related to the following location: at org.w3c.dom.Element at public java.util.List com.sun.xml.ws.developer.MemberSubmissionEndpointReference$Elements.elements at com.sun.xml.ws.developer.MemberSubmissionEndpointReference$Elements at public com.sun.xml.ws.developer.MemberSubmissionEndpointReference$Elements com.sun.xml.ws.developer.MemberSubmissionEndpointReference.referenceProperties at com.sun.xml.ws.developer.MemberSubmissionEndpointReference at com.sun.xml.bind.v2.runtime.IllegalAnnotationsException$Builder.check(IllegalAnnotationsException.java:102) at com.sun.xml.bind.v2.runtime.JAXBContextImpl.getTypeInfoSet(JAXBContextImpl.java:438) at com.sun.xml.bind.v2.runtime.JAXBContextImpl.<init>(JAXBContextImpl.java:286) at com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:139) at com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:117) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:211) at javax.xml.bind.ContextFinder.find(ContextFinder.java:372) at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:574) at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:522) at com.sun.xml.ws.spi.ProviderImpl$2.run(ProviderImpl.java:224) at com.sun.xml.ws.spi.ProviderImpl$2.run(ProviderImpl.java:221) at java.security.AccessController.doPrivileged(Native Method) at com.sun.xml.ws.spi.ProviderImpl.getEPRJaxbContext(ProviderImpl.java:221) at com.sun.xml.ws.spi.ProviderImpl.<clinit>(ProviderImpl.java:88) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at java.lang.Class.newInstance0(Class.java:355) at java.lang.Class.newInstance(Class.java:308) at javax.xml.ws.spi.FactoryFinder.newInstance(FactoryFinder.java:36) at javax.xml.ws.spi.FactoryFinder.find(FactoryFinder.java:95) at javax.xml.ws.spi.Provider.provider(Provider.java:83) at javax.xml.ws.Service.<init>(Service.java:56) at s.mra.ws.client.proxy.MRADataExchangeService.<init>(MRADataExchangeService.java:115) at s.mra.ws.client.impl.WSMraClient.initialize(WSMraClient.java:222) at s.mra.ws.client.impl.WSMraClient.sendMessageToWS(WSMraClient.java:93) at s.mra.message.router.WSMessageRouterBean.onMessage(WSMessageRouterBean.java:171) at weblogic.ejb.container.internal.MDListener.execute(MDListener.java:466) at weblogic.ejb.container.internal.MDListener.transactionalOnMessage(MDListener.java:371) at weblogic.ejb.container.internal.MDListener.onMessage(MDListener.java:327) at weblogic.jms.client.JMSSession.onMessage(JMSSession.java:4547) at weblogic.jms.client.JMSSession.execute(JMSSession.java:4233) at weblogic.jms.client.JMSSession.executeMessage(JMSSession.java:3709) at weblogic.jms.client.JMSSession.access$000(JMSSession.java:114) at weblogic.jms.client.JMSSession$UseForRunnable.run(JMSSession.java:5058) at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:516) at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201) at weblogic.work.ExecuteThread.run(ExecuteThread.java:173) > <1341096792650> <BEA-010065> <MessageDrivenBean threw an Exception in onMessage(). The exception was: java.lang.NoClassDefFoundError: Could not initialize class weblogic.wsee.jaxws.spi.WLSProvider. java.lang.NoClassDefFoundError: Could not initialize class weblogic.wsee.jaxws.spi.WLSProvider at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at java.lang.Class.newInstance0(Class.java:355) at java.lang.Class.newInstance(Class.java:308) at javax.xml.ws.spi.FactoryFinder.newInstance(FactoryFinder.java:36) at javax.xml.ws.spi.FactoryFinder.find(FactoryFinder.java:95) at javax.xml.ws.spi.Provider.provider(Provider.java:83) at javax.xml.ws.Service.<init>(Service.java:56) at s.mra.ws.client.proxy.MRADataExchangeService.<init>(MRADataExchangeService.java:115) at s.mra.ws.client.impl.WSMraClient.initialize(WSMraClient.java:222) at s.mra.ws.client.impl.WSMraClient.sendMessageToWS(WSMraClient.java:93) at s.mra.message.router.WSMessageRouterBean.onMessage(WSMessageRouterBean.java:171) at weblogic.ejb.container.internal.MDListener.execute(MDListener.java:466) at weblogic.ejb.container.internal.MDListener.transactionalOnMessage(MDListener.java:371) at weblogic.ejb.container.internal.MDListener.onMessage(MDListener.java:327) at weblogic.jms.client.JMSSession.onMessage(JMSSession.java:4547) at weblogic.jms.client.JMSSession.execute(JMSSession.java:4233) at weblogic.jms.client.JMSSession.executeMessage(JMSSession.java:3709) at weblogic.jms.client.JMSSession.access$000(JMSSession.java:114) at weblogic.jms.client.JMSSession$UseForRunnable.run(JMSSession.java:5058) at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:516) at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201) at weblogic.work.ExecuteThread.run(ExecuteThread.java:173) >
0
[ 2, 2741, 24268, 6819, 1863, 1437, 22, 38, 170, 37, 2741, 24268, 800, 3726, 3726, 31, 22, 79, 568, 13, 1409, 150, 18513, 38, 1863, 1409, 40, 38, 630, 197, 30, 25, 21, 141, 16, 2741, 24268, 20, 7920, 11712, 8, 10268, 6819, 37, 14,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Position JSON link in code === I used the following code from http://stackoverflow.com/questions/7979860/twitter-feeds-using-json-array quote: ---------- I use this code to retrieve Twitter feed: HttpClient httpclient = new DefaultHttpClient(); HttpResponse response = httpclient.execute(new HttpGet(url[0])); InputStream is = response.getEntity().getContent(); BufferedReader br = new BufferedReader(new InputStreamReader(is,"UTF-8")); StringBuffer sb = new StringBuffer(); try { String line = null; while ((line = br.readLine())!=null) { sb.append(line); sb.append('\n'); } } catch (IOException e) { e.printStackTrace(); } String jsontext = new String(sb.toString()); url[0] is the URL to the JSON feed. You must reformat your URL, this format you're using now is deprecated. Refer to https://dev.twitter.com/docs/api/1/get/statuses/user_timeline ---------- So i created a Twitter link: https://api.twitter.com/1/statuses/user_timeline.json?include_entities=true&include_rts=true&screen_name=safanbv&count=20&exclude_replies=True but how do i put this in this code i tried it to replace "url[0]" or just "[0]" but i dont know what is wrong. Can somebody help me im pretty new to java and android development.
0
[ 2, 649, 487, 528, 3508, 19, 1797, 800, 3726, 3726, 31, 147, 14, 249, 1797, 37, 7775, 6903, 25325, 2549, 9990, 9, 960, 118, 24652, 18, 118, 3399, 3399, 26713, 118, 38, 13098, 106, 8, 20954, 18, 8, 12655, 8, 728, 528, 8, 8576, 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...
issue with chat aplication (setInterval) === Hello i have a problem with outputing a JSON response: **function:** function ajax_request(){ var request = new XMLHttpRequest(); var url = "http://localhost/chat/controller.php?showmessage"; request.open("post", url, true); request.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); request.onreadystatechange = function(){ if(request.readyState == 4 && request.status == 200){ var return_data = JSON.parse(request.responseText); for(var i =0;i<return_data.length;i++){ //OUT PUT document.getElementById("chat").innerHTML += '<br/>' + return_data[i].message; } } } request.send();} then i use the setInterval function to refresh the chat box , so the problem is that every refresh with setInterval the output of the response in the div (chat) is **multiply the other result** **for example :** The output now is : Message : Hello world 1 Message : Hello world 2 Message : Hello world 3 Message : Hello world 4 Message : Hello world 5 and this is multiply every refresh how can i stop the multiply ? **Image :** ![enter image description here][1] [1]: http://i.stack.imgur.com/hrdIr.png
0
[ 2, 1513, 29, 6615, 21, 20669, 13, 5, 3554, 6280, 3377, 6, 800, 3726, 3726, 10975, 31, 57, 21, 1448, 29, 5196, 68, 21, 487, 528, 1627, 45, 13, 1409, 22359, 45, 1409, 1990, 20624, 1, 99, 10351, 5, 6, 1, 4033, 3772, 800, 78, 2350...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
In rake task, execute command, read stdout until a certain line is matched, then detach and continue task === I want to launch a java servlet, observe its stdout until I see that it has fully loaded, and then go back to the rest of my rake task while keeping that process running. Currently I have something like this: IO.popen "java -jar ./tools/tests/servlet.jar" do |io| io.each do |line| puts line Process.detach(io.pid) if line.include? 'Server ready.' # need help here end end puts "Ready..." How do I exit this IO block to continue with the task, while keeping the process running? Thank you!
0
[ 2, 19, 21009, 3005, 15, 15644, 1202, 15, 1302, 354, 43, 1320, 163, 21, 1200, 293, 25, 11265, 15, 94, 28683, 17, 1816, 3005, 800, 3726, 3726, 31, 259, 20, 3394, 21, 8247, 13, 10321, 1336, 15, 10503, 82, 354, 43, 1320, 163, 31, 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...
fuse-android installing === I am trying to install fuse-android library to android virtual device. To do that I firstly tried to make a fuse kernel module support for AVD. My OS is Linux. I took this module from this path /lib/modules/3.2.0-23-generic/kernel/fs/fuse/cuse.ko and copied him to the /dev directory of AVD. Then in AVD console I executed a command: #insmod cuse.co After that I received the next message: init_module 'cuse.ko' failed (Function not implemented). What could cause this problem? Maybe, I am trying to use a wrong module? Perhaps, somebody can tell me what are the right steps for configuring fuse-android lib? I did not manage to find anything about it in google. Thanks in advance.
0
[ 2, 13, 13072, 8, 290, 18524, 25429, 800, 3726, 3726, 31, 589, 749, 20, 16146, 13, 13072, 8, 290, 18524, 1248, 20, 13005, 6599, 3646, 9, 20, 107, 30, 31, 64, 102, 794, 20, 233, 21, 13, 13072, 17007, 12613, 555, 26, 14026, 43, 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...
How to dynamically create public variable in constructor without declare it in a class (like ORM style) === Thank you for this Website, normally I have always found the correct answer but here not :/ I want to create an orm like class now I use a magic functions to doing something like this, but is it not possible to have an easier way to add dynamically public variable ? For now I have something like this : class ormClass extends otherClass { public $data = array(); public $email; public function __construct($email = '') { parent::__construct(); $data = parent::$this->getContactData($email); foreach($data->fields as $key=>$v) { $this->data[$v->name] = $v->value; } } public function __get($name) { if(isset($this->{$name})) return $this->{$name}; elseif(isset($this->data[$name])) return $this->data[$name]; elseif(isset($GLOBALS[$name])) return $GLOBALS[$name]; } } But it's not possible to add directly in the constructor a public variable (as I know) like this : foreach($data->fields as $key=>$v) { $this->{$v->name} = $v->value; //init something like public... without declaring as public value } It's for an Open-Source project to unify scripts, webservices with almost the same class functions name and always the same way you manipulate it (generally like an ORM) , the code has to be the more readable and easy to understand so if you have a better solution to create easily an ORM class like, you're welcome :-) Thanks !
0
[ 2, 184, 20, 7782, 1326, 1600, 317, 7612, 19, 6960, 248, 366, 10123, 32, 19, 21, 718, 13, 5, 1403, 54, 79, 1034, 6, 800, 3726, 3726, 3531, 42, 26, 48, 2271, 15, 4147, 31, 57, 550, 216, 14, 4456, 1623, 47, 235, 52, 13, 45, 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...
Google Maps Directions URL with pin at Lat/Long === I am trying to build a URL that will bring up Google Maps in Directions mode, starting at a long/lat, and showing a pin at that location. I currently have the following working, but it doesn't drop a pin at my coordinates. https://maps.google.com/maps?daddr=35.17334,-106.55594&hl=en&sll=35.17334,-106.55594&sspn=28.132942,65.170898&t=m&mra=mift&mrsp=1&sz=5&z=18 https://maps.google.com/maps?daddr=35.17334,-106.55594&hl=en&sll=35.17334,-106.55594&sspn=28.132942,65.170898&t=m&mra=mift&mrsp=1&sz=5&z=18 Is there a way to do what I have already done, but also have a pin at the long/lat?
0
[ 2, 8144, 6867, 7876, 287, 6362, 29, 3459, 35, 14303, 118, 2701, 800, 3726, 3726, 31, 589, 749, 20, 1895, 21, 287, 6362, 30, 129, 1499, 71, 8144, 6867, 19, 7876, 3740, 15, 1422, 35, 21, 175, 118, 8927, 15, 17, 3187, 21, 3459, 35,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
getting drop-down query script to trigger only when user hovers over a child div === I have the following hover script that handles the sliding down of sub menus in my navigation bar: $j('body').ready(function() { $j('.menu-item').hover(function() { $j(this).find('.sub-menu').slideDown("slow"); }, function() { $j(this).find('.sub-menu').slideUp("slow"); }); }); At present the slide down is activated whenever the user hovers over the .menu-item div, as expected. However, I would only like the slide down to be activated when the user hovers over a child div contained within the .menu-item div, namely .bottom_nav. HTML is in the form: <li class="menu-item"> <div class="box"> <div class="top_nav"></div> <div class="clear"> <div class="bottom_nav"><div class="left_nav"></div><div class="center_nav"><a href="http://soteriabrighton.co.uk/news/">news</a></div><div class="right_nav"></div></a></div></div> <ul class="sub-menu"> <li><div class="box"> <div class="top_nav"></div> <div class="clear"> <div class="bottom_nav"><div class="left_nav"></div><div class="center_nav"><a href="http://soteriabrighton.co.uk/news/events/">events</a></div><div class="right_nav"></div></a></div></div> </li> </ul> </li> You can see the nav item in action on [this page][1], specifically on the 'news' item, which has a dropdown for an events page. You will need to enter the following credentials as the site is under development: username:guest password:stackoverflow [1]: http://soteriabrighton.co.uk/
0
[ 2, 1017, 2804, 8, 2968, 25597, 3884, 20, 7286, 104, 76, 4155, 21350, 18, 84, 21, 850, 13, 12916, 800, 3726, 3726, 31, 57, 14, 249, 21350, 3884, 30, 3053, 18, 14, 7609, 125, 16, 972, 11379, 18, 19, 51, 8368, 748, 45, 5579, 728, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
selectOneMany Yesod Persistent === Im trying to get selectOneMany to work with limited success. I have the following database models User email Text verkey Text Maybe verified Bool password Text Maybe UniqueUser email date UTCTime deriving Show Competence parent CompetenceId Maybe title Text UniqueCompetence title deriving Show Read UserCompetence competence CompetenceId user UserId Eq UniqueUserCompetence user competence deriving Show Read code from my handler mmember <- runMaybeT $ do id <- MaybeT $ maybeAuth user <- MaybeT . runDB . get . entityKey $ id Entity memberId member <- MaybeT . runDB . getBy . UniqueMember . userEmail $ user competences <- lift . runDB . runJoin $ (selectOneMany (UserCompetenceUser <-.) userCompetenceUser) return (member,competences) first of; I cant event get this code to run without adding a big type-signature, is this as it should be? competences <- lift . runDB . runJoin $ (selectOneMany (UserCompetenceUser <-.) userCompetenceUser :: SelectOneMany SqlPersist (UserGeneric SqlPersist) (UserCompetenceGeneric SqlPersist)) secondly; what is the type of competences. Ideally i want to end up with [Entity competenceId competence]. Lastly; How would one add a filter to the above join so as to only aqquire competences for 'user'?
0
[ 2, 5407, 849, 14842, 1643, 5648, 15348, 800, 3726, 3726, 797, 749, 20, 164, 5407, 849, 14842, 20, 170, 29, 1317, 1280, 9, 31, 57, 14, 249, 6018, 2761, 4155, 8517, 1854, 2494, 4237, 1854, 913, 23334, 1607, 1823, 20884, 1854, 913, 261...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How to launch a different set of annotations in MapView from a second plist === I have a app with a map view that displays annotations stored in a plist. I would like to have a menu where you can choose "map 1" and "map 2" which will show different annotations. My idea is to have this second map load annotations from a second plist. But I have no idea of how to do this. I would really appreciate some advice! Thanks of beforehand! Here is my code ad for now. #import "ViewController.h" #import "NewClass.h" @implementation ViewController @synthesize mapview; -(void)saveString:(NSString*)myString { [[NSUserDefaults standardUserDefaults] setObject:myString forKey:@"String"]; } - (void)mapView:(MKMapView *)mapView annotationView:(MKAnnotationView *)view calloutAccessoryControlTapped:(UIControl *)control { NewClass *ann = (NewClass *)view.annotation; NSString *subtitle = ann.subtitle; // [[UIApplication sharedApplication] openURL:[NSURL URLWithString:ann.website]]; NSLog(@"%@",subtitle); [self saveString:subtitle]; [self performSegueWithIdentifier:@"hello" sender:self]; } -(IBAction)getLocation { mapview.showsUserLocation = YES; } -(IBAction)setMap:(id)sender { switch (((UISegmentedControl *) sender).selectedSegmentIndex) { case 0: mapview.mapType = MKMapTypeStandard; break; case 1: mapview.mapType = MKMapTypeSatellite; break; case 2: mapview.mapType = MKMapTypeHybrid; break; default: break; } } - (void)viewDidLoad { [super viewDidLoad]; [mapview setMapType:MKMapTypeStandard]; [mapview setZoomEnabled:YES]; [mapview setScrollEnabled:YES]; [self addPointsToMap]; } -(MKAnnotationView *) mapView:(MKMapView *)mapView viewForAnnotation:(id <MKAnnotation>)annotation { MKPinAnnotationView *MyPin =(MKPinAnnotationView *)[mapView dequeueReusableAnnotationViewWithIdentifier:@"MyPin"]; if ([annotation isKindOfClass:[MKUserLocation class]]) return nil; if (!MyPin) { MyPin = [[MKPinAnnotationView alloc] initWithAnnotation:annotation reuseIdentifier:@"MyPin"]; MyPin.pinColor = MKPinAnnotationColorRed; MyPin.canShowCallout = YES; UIButton *details = [UIButton buttonWithType:UIButtonTypeDetailDisclosure]; MyPin.rightCalloutAccessoryView = details; MyPin.canShowCallout = YES; } return MyPin; } -(void)addPointsToMap{ NSArray *spotArray = [NSArray arrayWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"BikeParks2" ofType:@"plist"]]; for (NSDictionary *dic in spotArray){ MKCoordinateRegion region4 = { {0.0, 0.0 }, {0.0, 0.0 } }; region4.center.latitude = [[dic objectForKey:@"latitude"] doubleValue]; region4.center.longitude = [[dic objectForKey:@"longitude"] doubleValue]; region4.span.longitudeDelta = 100.0f; region4.span.latitudeDelta = 100.0f; [mapview setRegion:region4 animated:YES]; NewClass *ann4 = [[NewClass alloc] init]; ann4.title = [dic objectForKey:@"title"];; ann4.subtitle = [dic objectForKey:@"subtitle"];; ann4.coordinate = region4.center; ann4.website = [dic objectForKey:@"website"];; [mapview addAnnotation:ann4]; } }
0
[ 2, 184, 20, 3394, 21, 421, 309, 16, 40, 1270, 7504, 19, 2942, 4725, 37, 21, 153, 351, 5739, 800, 3726, 3726, 31, 57, 21, 4865, 29, 21, 2942, 1418, 30, 9412, 40, 1270, 7504, 8214, 19, 21, 351, 5739, 9, 31, 83, 101, 20, 57, 21...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How do I get rid of the padding in my Sencha Touch 2 toolbar? === here it is: http://jsfiddle.net/sd1212/awHkT/2/ There is space between the buttons and they do not take up the whole toolbar. I don't want any of that padding. I used firebug to try to eliminate the padding. I thought that the layout class was: x-inner x-toolbar-inner x-layout-hbox so in my CSS file, I put: .x-inner x-toolbar-inner x-layout-hbox { padding: 0 !important; } Nothing happened. Can someone help me out? Thanks in advance
0
[ 2, 184, 107, 31, 164, 6681, 16, 14, 4432, 3258, 19, 51, 8252, 1651, 1723, 172, 5607, 1850, 60, 800, 3726, 3726, 235, 32, 25, 45, 7775, 6903, 728, 18, 1707, 12312, 9, 2328, 118, 18, 43, 12586, 9298, 3885, 11321, 38, 118, 9298, 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...
Transformed image from GAE Images API upload to Facebook === **Does anyone know how to convert a GAE Images API Image object into a "file like object"?** I'm trying to upload an image that I've transformed from the GAE Images API to Facebook. I'm using the execute_transforms function, which returns a "Image Representation" of the image. I've tried to upload it using the following code, but I get a FB API Error "No Uploaded Image" img = images.Image(ORIGINAL_IMAGE) img.crop(0.0, 5.0/img.height, 713.0/img.width, 644.0/img.height) output = img.execute_transforms(output_encoding=images.PNG) graph = fb.GraphAPI(access_token) graph.put_photo(output, 'Look at this cool photo!') I think the issue is that *output* is not a "file like object" which is what put_photo requires, but the GAE docs doesn't have a function for casting into a "file like object". Tried creating temp files and writing to them, but GAE doesn't allow writing to filesystem. I've also tried to write to a StringIO object, but that didn't work. Thanks
0
[ 2, 8445, 1961, 37, 13, 17721, 3502, 21, 2159, 71, 8294, 20, 9090, 800, 3726, 3726, 13, 1409, 10739, 1276, 143, 184, 20, 8406, 21, 13, 17721, 3502, 21, 2159, 1961, 3095, 77, 21, 13, 7, 16877, 101, 3095, 7, 60, 1409, 31, 22, 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...
jQuery UI Dialog with Confirmation === I have a jQuery UI dialog that gets a line of text. If this text is not contained in a localStorage dictionary, I insert it into the dictionary. If it *is* present, I want to give the user the option not to overwrite the existing entry in the "ok" handler. Because jQuery UI dialogs are stateful and persist across multiple calls unless explicitly removed (AFAICT), I'm not seeing a clear path to presenting the "are you sure you want to nuke your previous entry?" alert without resorting to ... uh ... alert. The question, succinctly stated: Can you create a confirmation box from inside a jQuery UI Dialog? Thanks.
0
[ 2, 487, 8190, 93, 13, 5661, 28223, 29, 15939, 800, 3726, 3726, 31, 57, 21, 487, 8190, 93, 13, 5661, 28223, 30, 3049, 21, 293, 16, 1854, 9, 100, 48, 1854, 25, 52, 3437, 19, 21, 375, 18, 2153, 1303, 9186, 15, 31, 14692, 32, 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...
How to match a pattern and exclude another pattern within a string === perl My objective is to match a pattern that doesn't contain '#' before the pattern for example this array = ("# abc", "# abcd" "abc" " abc ", "abcd" "abc # foo") want to match "abc". " abc" . "abcd" . "abc #foo" what regular expression do I need so as to match only patterns of 'abc' that does not contain '#'? I tried m/[^#]+abc/g but doesn't work. Thanks for any help.
0
[ 2, 184, 20, 730, 21, 3732, 17, 21077, 226, 3732, 363, 21, 3724, 800, 3726, 3726, 416, 255, 51, 7038, 25, 20, 730, 21, 3732, 30, 1437, 22, 38, 3717, 13, 22, 5910, 22, 115, 14, 3732, 26, 823, 48, 7718, 800, 13, 5, 7, 5910, 507...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 Ajax links right-clickable === I am having a problem, my website www.projectbuilder.tk is 100% ajax powered, how I have ran into a problem that seems to stump me, I can set the urlbar/history to each visited page, and have php loading the pages on the user's first visit based on ?page= from there all pages and data is loaded via ajax. The problem is that no one can actually right click the links (as I cannot give them the href attribute without causing the page to reload, and skipping the onclick event) So my question is how do I make the ajax links look like normal links for right-click and open in new window, or tab, or copy url? thanks.
0
[ 2, 92, 22, 38, 233, 20624, 6271, 193, 8, 150, 10129, 579, 800, 3726, 3726, 31, 589, 452, 21, 1448, 15, 51, 2271, 13, 6483, 9, 21011, 20904, 9, 38, 197, 25, 12849, 20624, 7462, 15, 184, 31, 57, 717, 77, 21, 1448, 30, 2206, 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...
Why is wcf 4.0 returning chuncked data when wcf 3.5 does not? === I have an application that calls an asp.net 1.1 web service via wcf. With the .Net 3.5 version, the the web service always returns a fully buffered response (no transfer encoding). But when I run the exact same code in .Net 4.0 the same web service returns a chunked response ("Transfer-Encoding: chunked"). Here is my problem: In production I have to make my service call through a home-grown service router that chokes on the chunked response. I can't make changes to the router. What can I do to make wcf 4.0 work like 3.5 did in this case? Here is the binding I'm using for both the 3.5 and 4.o versions: <binding name="BrokerServiceSoap" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:20:00" sendTimeout="00:20:00" allowCookies="false" bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard" maxBufferSize="2147483647" maxBufferPoolSize="524288" maxReceivedMessageSize="2147483647" messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered" useDefaultWebProxy="true"> <readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647"/> <security mode="TransportCredentialOnly"> <transport clientCredentialType="Windows" proxyCredentialType="None" realm=""/> <message clientCredentialType="UserName" algorithmSuite="Default"/> </security> </binding>
0
[ 2, 483, 25, 11801, 410, 268, 9, 387, 2485, 13, 12583, 2601, 69, 1054, 76, 11801, 410, 203, 9, 264, 630, 52, 60, 800, 3726, 3726, 31, 57, 40, 3010, 30, 3029, 40, 28, 306, 9, 2328, 137, 9, 165, 2741, 365, 1197, 11801, 410, 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...
Global NSMutableString === I have a tabbed views where I need to select various options from different tabbed views which should be appended in the same string. For this I want to use a NSMutableString. After all the options are selected and string is formed as required. I want to access this NSMutableString in the next view which is not tabbed. I think for this I need to declare the NSMutableString as a global variable? Can someone please help me with this. I am new to objective-c and xcode. Thank you. Any help is much appreciated!
0
[ 2, 2062, 13, 2172, 7903, 579, 11130, 800, 3726, 3726, 31, 57, 21, 6523, 4283, 4146, 113, 31, 376, 20, 5407, 617, 6368, 37, 421, 6523, 4283, 4146, 56, 378, 44, 4865, 10726, 19, 14, 205, 3724, 9, 26, 48, 31, 259, 20, 275, 21, 13...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
jquery ui autocomplete display if no results === i am working with jquery ui autocomplete plugin and want to display some text if no results are found. i have seen alot of examples to do this with remote datasets, but i have the source set to a local json array. here is the code i am working with right now, it hides all rows that do not match the selected value. i want to hide all rows and display a 'no entries found' in the text box when a user is typing text that does not match any of the available tags $( "#archiveVendor" ).autocomplete({ source: availableTags, select: function(event, ui){ var emptyRow = '<tr class="emptyArchive"><td class="approved_content">---</td><td>---</td><td>---</td><td class="payment_status">---</td></tr>'; $('.archive_inner .emptyArchive').remove(); $('.archive_inner tr').show().filter(function(index){ var tds = $(this).children('td'); if($(tds).length == 4){ if($(tds[1]).text() == '---'){ return false; } var title = $(tds[0]).attr('title'); return title === ui.item.value ? false : true; } }).hide(); if($('.archive_approved tr:visible').length == 1){ $('.archive_approved tbody').append(emptyRow); } if($('.archive_denied tr:visible').length == 1){ $('.archive_denied tbody').append(emptyRow); } } });
0
[ 2, 487, 8190, 93, 13, 5661, 3108, 15990, 3042, 100, 90, 1736, 800, 3726, 3726, 31, 589, 638, 29, 487, 8190, 93, 13, 5661, 3108, 15990, 10922, 108, 17, 259, 20, 3042, 109, 1854, 100, 90, 1736, 50, 216, 9, 31, 57, 541, 21, 5639, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
R: changing the size of === First off, i'm not a programmer, so my excuses if i'm using wrong jargon or if i'm asking stupid things. I'm using R to create a competitive map of strategic groups in the industry i'm researching, where number of outlets is the X-chart, Sales is the Y-chart and Sales again is the size of the bubble.Code used: qplot(data=supermarket,x=outlets,y=sales, size=sales, color=retailer) However, i need to increase the overal size of the bubbles as it is too unclear at the moment. Please see http://i.imgur.com/x6WTT.png for an example. What i need is to have the bubbles keep their size relative to sales, but become larger overall to increase the visibility. Thanks for any help :).
0
[ 2, 761, 45, 4226, 14, 1072, 16, 800, 3726, 3726, 64, 168, 15, 31, 22, 79, 52, 21, 17968, 15, 86, 51, 6658, 18, 100, 31, 22, 79, 568, 1389, 5112, 4099, 54, 100, 31, 22, 79, 3379, 3553, 564, 9, 31, 22, 79, 568, 761, 20, 1600...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Groovy Spring DSL: constructing beans with properties of other beans === I have a bunch of Spring beans some of which need to be initialized from other beans, and some of which need to be initialized from properties of those other beans. E.g.: Foo { } Bar { String getBaz() } Qux { Qux(Foo foo, String baz) } I thought I could write something like beans = { foo(Foo) {} bar(Bar) {} qux(Qux, ref('foo'), ref('foo').baz) {} } but obviously this doesn't work because `ref('foo')` isn't Foo, it's a `RuntimeBeanReference`. In plain Spring (3+) what I want is apparently possible with [spring expressions](http://www.enigmastation.com/2010/04/07/java-surgery-spring-injection-of-other-beans-properties/) but I can't figure out the necessary syntax with the Grails Spring DSL. Can it be done?
0
[ 2, 3452, 2026, 93, 1573, 13, 43, 18, 255, 45, 18660, 14685, 29, 3704, 16, 89, 14685, 800, 3726, 3726, 31, 57, 21, 7653, 16, 1573, 14685, 109, 16, 56, 376, 20, 44, 2104, 1333, 37, 89, 14685, 15, 17, 109, 16, 56, 376, 20, 44, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
C#.NET - Microsoft.SqlServer.Management.Smo.FailedException === It's more frustrating right now me! I did create a application initially for restore/backup database in C#.NET and it did work but some how it is not working right now; even though my code is same. I am getting error message Microsoft.SqlServer.Management.Smo.FailedOperationException and I am searching solution for this error message since hours. Can anyone help me out? Here is my code- //call restore class Restore sqlRestore = new Restore(); //set the restore type to a database restore sqlRestore.Action = RestoreActionType.Database; //select database Database db = sqlServer.Databases["database"]; //stop all process on specific database sqlServer.KillAllProcesses("database"); //Backup device type i.e. backup file BackupDeviceItem deviceItem = new BackupDeviceItem(@"C:\Program Files (x86)\" + _filename, DeviceType.File); //add device type to restore class sqlRestore.Devices.Add(deviceItem); //if database already exists, replace it sqlRestore.ReplaceDatabase = true; //perform the restore sqlRestore.SqlRestore(sqlServer);
0
[ 2, 272, 5910, 9, 2328, 13, 8, 7099, 9, 18, 22402, 10321, 106, 9, 23502, 9, 18, 1293, 9, 24910, 69, 10066, 872, 800, 3726, 3726, 32, 22, 18, 91, 25568, 193, 130, 55, 187, 31, 144, 1600, 21, 3010, 1537, 26, 8454, 118, 1958, 576,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Winforms: Attempted to read or write protected memory. This is often an indication that other memory is corrupt === I have a bunch of background events. All of them call a log: private void log(string text, params object[] values) { if (editLog.InvokeRequired) { editLog.BeginInvoke( (MethodInvoker)delegate { this.log(text, values); }); } else { text = string.Format(text, values) + Environment.NewLine; lock (editLog) { editLog.AppendText(text); editLog.SelectionStart = editLog.TextLength; editLog.ScrollToCaret(); } } } Sometimes I get this, but other times not: System.AccessViolationException was unhandled Message=Attempted to read or write protected memory. This is often an indication that other memory is corrupt. Source=System.Windows.Forms StackTrace: at System.Windows.Forms.UnsafeNativeMethods.CallWindowProc(IntPtr wndProc, IntPtr hWnd, Int32 msg, IntPtr wParam, IntPtr lParam) at System.Windows.Forms.NativeWindow.DefWndProc(Message& m) at System.Windows.Forms.Control.WndProc(Message& m) at System.Windows.Forms.RichTextBox.WndProc(Message& m) at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam) at System.Windows.Forms.UnsafeNativeMethods.SendMessage(HandleRef hWnd, Int32 msg, Int32 wParam, Object& editOle) at System.Windows.Forms.TextBoxBase.ScrollToCaret() at Program1.frmMain.log(String text, Object[] values) in ... ... ... P.D: Not always stop at this line, randomly will be one of the three times editLog methods/properties are used. Not always a exception is throw. Sometimes look like the thing freeze. But not the main UI, just the flow of messages (ie: log look like is never called again) The app is a single form, with background process. I can't see what I doing wrong with this...
0
[ 2, 628, 4190, 18, 45, 3066, 20, 1302, 54, 2757, 3803, 1912, 9, 48, 25, 478, 40, 11290, 30, 89, 1912, 25, 11305, 800, 3726, 3726, 31, 57, 21, 7653, 16, 2395, 963, 9, 65, 16, 105, 645, 21, 6738, 45, 932, 11364, 6738, 5, 11130, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
My Tic Tac Toe game in Python 3.2.. Code Suggestions and Tips? === so for the past like 3 or 4 days, i've been working on a tic tac toe game. and every single time i fix an error, i get a new one. i've asked and googled plenty of things. and now, i fixed something, and when i try and run it, it won't even like start. UUUUUGGGGGHHHHH! so, i was wondering if you guys could look over my code and fix any errors or make suggestions to make it better or something, tips, and all that wonderful stuff . I have Python 3.2 by the way. thanks so much guys. here's the code: import random board = [0,1,2, 3,4,5, 6,7,8] def show(): print (board[0],"|",board[1],"|",board[2]) print ("----------") print (board[3],"|",board[4],"|",board[5]) print ("----------") print (board[6],"|",board[7],"|",board[8]) def checkLine(char, spot1, spot2, spot3): if board[spot1] == char and board[spot2] == char and board[spot3] ==char: return True def checkAll(char): if checkLine(char, 0, 1, 2): return True if checkLine(char, 1, 4, 7): return True if checkLine(char, 2, 5, 8): return True if checkLine(char, 6, 7, 8): return True if checkLine(char, 3, 4, 5): return True if checkLine(char, 1, 2, 3): return True if checkLine(char, 2, 4, 6): return True if checkLine(char, 0, 4, 8): return True while True: answer = input("Select a spot:") answer = int(answer) if board[input] !='x' and board[input] !='o': board[input] = 'x' else: print ("This spot is taken.") if checkAll('x') == True: print ("-- X WINS --") while True: random.seed() opponent = random.randint(0,8) if board[opponent] != 'o' and board[opponent] != 'x': board[opponent] = 'o' if checkAll('o') == True: print ("-- O WINS --") break; break; else: print ("This spot is taken!") show()
2
[ 2, 51, 13, 1786, 13, 6981, 20, 62, 250, 19, 20059, 203, 9, 135, 9, 9, 1797, 18389, 17, 11034, 60, 800, 3726, 3726, 86, 26, 14, 640, 101, 203, 54, 268, 509, 15, 31, 22, 195, 74, 638, 27, 21, 13, 1786, 13, 6981, 20, 62, 250,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 Multiple Scripts with document.ready() function. Just the first works in IE === I have the following problem with my new Website: http://clemenshamann.de: If the page loads in firefox/chrome etc. everything works fine. Now if the page loads in IE 8 or 9 for example the page loads but only the first script declared in the header works (it fades the background image). The next two scripts just startk working if I press F12 to open the Developer Tools of the IE. Any of the scripts has there own document.ready() function. Dows anyone have a suggestion why it caused that? Here is some code: (You can watch the hole Code at the above given domain) <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script> <!-- Check for IE and set global variable--> <!--[if IE]> <script type="text/javascript"> var is_ie = true; </script> <![endif]--> <script type="text/javascript"> if (typeof is_ie == "undefined") { var is_ie = false } </script> <!-- Enable bg image fade for all browsers but IE --> <script type="text/javascript" src="js/bg_fade_resize.js"></script> <!-- Portfolio Slider Script--> <script type="text/javascript" src="js/portfolio_slider.js"></script> <!-- Seitenscrolling--> <script type="text/javascript" src="js/scrolling.js"></script> If you need more information please ask me. Thank you!
0
[ 2, 487, 8190, 93, 1886, 17505, 29, 4492, 9, 15193, 5, 6, 1990, 9, 114, 14, 64, 693, 19, 13, 660, 800, 3726, 3726, 31, 57, 14, 249, 1448, 29, 51, 78, 2271, 45, 7775, 6903, 5615, 755, 3162, 1897, 9, 546, 45, 100, 14, 2478, 190...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How to stop my xml file duplicating on refresh instead of renewing? === I have this xml file which has text init. i.e **Hi my name is steven** When i add a **Setinterval** to load the xml file every 10 seconds i get **Hi my name is stevenHi my name is stevenHi my name is stevenHi my name is steven** This continues duplicating every 10 seconds Here is my javascript xml function myLoadInteval = setInterval(Xml, 10000); function Xml(){ $(document).ready(function() { $.ajax({ type: "GET", url: "http://www.mobilefriendlywebapps.co.uk/tayloredtest1/note.xml", dataType: "xml", success: parseXml }); function parseXml(xml) { $(xml).find("menu").each(function() { //find each instance of loc in xml file and wrap it in a link $("div#site_list").append( $(this).find("cd").text() ); $("div#treatments").append( $(this).find("cd1").text() ); $("div#preparation").append( $(this).find("cd2").text() ); $("div#products").append( $(this).find("cd3").text() ); $("div#info").append( $(this).find("cd4").text() ); $("div#price").append( $(this).find("cd5").text() ); $("div#promo").append( $(this).find("cd6").text() ); }); } }); } How do i remove the old xml before the new on loads? many thanks steve
0
[ 2, 184, 20, 747, 51, 23504, 3893, 1052, 25971, 1203, 27, 24905, 700, 16, 19975, 68, 60, 800, 3726, 3726, 31, 57, 48, 23504, 3893, 56, 63, 1854, 19, 242, 9, 31, 9, 62, 13, 1409, 1822, 51, 204, 25, 5761, 1409, 76, 31, 3547, 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...