unified_texts
stringlengths
32
30.1k
OpenStatus_id
int64
0
4
input_ids
list
token_type_ids
list
attention_mask
list
Using firefox and Chrome Driver in selenium 2.24.0 === I'm using Selenium to buid a project about automation testing but I have some problem with these lines of code : String exePath = "Browser\\firefox5.0.1\\firefox.exe"; var firefoxProfile = new FirefoxProfile(); m_browser = new FirefoxDriver(new FirefoxBinary(exePath), firefoxProfile); m_browser.Navigate().GoToUrl(url); I can't set firefox url with these codes. But if I use InternetExplorer instead, I can set IE url. I don't know where the problem is Plz help me. Thank you so much!
0
[ 2, 568, 535, 18219, 17, 13, 12985, 2425, 19, 23027, 14311, 172, 9, 1996, 9, 387, 800, 3726, 3726, 31, 22, 79, 568, 23027, 14311, 20, 3183, 1340, 21, 669, 88, 23217, 4431, 47, 31, 57, 109, 1448, 29, 158, 1560, 16, 1797, 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...
including a file containing tinyMCE editor, in a <div> of other file, using Ajax === I have a **index.pl** file , in this file am adding another perl file (editor.pl) trough ajax . This **editor.pl** file contain a text editor (id='text_editor') now in a js file (include_tiny_mce.js, which is included in editor.pl), i have defined **tinyMCE.init** function ad below : <br/> tinyMCE.init({ mode : "textareas", theme : "advanced", skin : "o2k7", skin_variant : "black" }); <br/> To add editor.pl in index.pl i have defined a div with id='edit_div' in index.pl . On clicking a link in index.pl an event is triggered from jQuery as below <br/> ("#link").click(function(){$.ajax({ url : 'editor.pl', type : 'POST', success : function(message){ ("#edit_div").html(message); }); }) now when i m opening **editor.pl** in browser it is showing tinyMCE editor but opening it from the link in index.pl it is not showing tineyMCE, instead of that a plane text editor is showing.<br/> Any one got any solution for that ??
0
[ 2, 215, 21, 3893, 3503, 3228, 79, 1105, 1835, 15, 19, 21, 13, 1, 12916, 1, 16, 89, 3893, 15, 568, 20624, 800, 3726, 3726, 31, 57, 21, 13, 1409, 25671, 9, 5727, 1409, 3893, 13, 15, 19, 48, 3893, 589, 4721, 226, 416, 255, 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...
Live video streaming link === Hi I am Developing an app with app inventor and I would likethe direct link to a live streaming video on the http://www.aljazeera.net/livestreaming/pages Page. I cant find it. the goal is to embed the Video to the app and have it start when a button is clicked. Thank you
0
[ 2, 515, 763, 11920, 3508, 800, 3726, 3726, 4148, 31, 589, 3561, 40, 4865, 29, 4865, 10981, 17, 31, 83, 101, 124, 1744, 3508, 20, 21, 515, 11920, 763, 27, 14, 7775, 6903, 6483, 9, 192, 29270, 9, 2328, 118, 5928, 11260, 68, 118, 6...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
CSS multiple input[type] selectors === According to the W3 CSS spec, something like: `input[type~="text password"]` should select input fields whose type is set to either "text" or "password", but it doesn't work! Did I misinterpret this line? > E[foo~="warning"] Matches any E element whose "foo" attribute value is > a list of space-separated values, one of which is exactly equal to > "warning". [CSS spec source][1], it's the fourth from the bottom in the table. [1]: http://www.w3.org/TR/CSS2/selector.html#pattern-matching
0
[ 2, 272, 18, 18, 1886, 6367, 2558, 4474, 500, 23946, 18, 800, 3726, 3726, 496, 20, 14, 619, 240, 272, 18, 18, 12737, 15, 301, 101, 45, 13, 1, 108, 4881, 2558, 4474, 1, 3726, 7, 11969, 20884, 7, 500, 1, 378, 5407, 6367, 2861, 11...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How can I make the rectangles clickable, C# === The code can generate rectangles (Rectangle rectangle) at rum time. The position of rectangles may change according to users' choices. I want to add code in the method where it creates rectangles to make the rectangles clickable. And after user clicking the rectangle, there will be a new window to show content just like text. Thanks a lot!
0
[ 2, 184, 92, 31, 233, 14, 27181, 18, 10840, 579, 15, 272, 5910, 800, 3726, 3726, 14, 1797, 92, 7920, 27181, 18, 13, 5, 14673, 38, 15427, 27181, 6, 35, 11148, 85, 9, 14, 649, 16, 27181, 18, 123, 753, 496, 20, 3878, 22, 10978, 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...
android - image get bigger on click on small image === I created an image(ImageView) on the application, I need to make the image bigger and able zoom once user click on the small image. I try pop up but it only show the image but not able zoom . Any idea how I can achieve it. Appreciate if can provide me some link where I can read on. Thanks.
0
[ 2, 13005, 13, 8, 1961, 164, 6197, 27, 10840, 27, 284, 1961, 800, 3726, 3726, 31, 679, 40, 1961, 5, 22039, 4725, 6, 27, 14, 3010, 15, 31, 376, 20, 233, 14, 1961, 6197, 17, 777, 19469, 382, 4155, 10840, 27, 14, 284, 1961, 9, 31,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Running Curl in cPanel on an SSL URL === I'm running a cron job on cPanel every minute that runs a URL on my site to process some images. It was working fine until I installed an SSL and now it won't run the script. How do I curl a URL which is within the SSL?
0
[ 2, 946, 14320, 19, 272, 3206, 532, 27, 40, 13, 18, 18, 255, 287, 6362, 800, 3726, 3726, 31, 22, 79, 946, 21, 13, 19587, 1205, 27, 272, 3206, 532, 352, 2038, 30, 1461, 21, 287, 6362, 27, 51, 689, 20, 953, 109, 3502, 9, 32, 23...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Merging XML Elements with LINQ === I have two XML documents. My objective is to replace one of the nodes in the first document with the entire contents of the second Xml documents. So the first document - **Parent** looks something like this: <Root> <AgencyName = "Some Agency"> <Originator = "Some other Agency"> <Type = "AnonymousType"> <Details/> </Root> The second document - **children** looks like this: <Root> <Details> <Detail1> ... </Detail1> <Detail2> ... </Detail2> <Detail3> ... </Detail3> </Details> </Root> The node `<Details/>` has to be replaced with the contents of the second document. I am attempting to use Linq to XML to do this. The first document is represented in an XDocument class and the second one is represented in an XElement class. There are several child attributes for `<Detail/>` and I haven't listed them here. I am attempting to replace the <Details/> element from the first document with this XElement class. If I try something like this, ParentDoc.Element("Details").ReplaceAll(children); it is unlikely to work. **How should I do the replace?**
0
[ 2, 18842, 23504, 2065, 29, 6294, 1251, 800, 3726, 3726, 31, 57, 81, 23504, 4374, 9, 51, 7038, 25, 20, 3934, 53, 16, 14, 16272, 19, 14, 64, 4492, 29, 14, 1078, 8478, 16, 14, 153, 23504, 4374, 9, 86, 14, 64, 4492, 13, 8, 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...
Plugin not recognizing "this" jQuery === I am trying to get my plugin to recognize the element which it is called from such as: $('#element').myPlugin({}); (function($) { $.fn.myPlugin = function(settings) { var element = $(this); $.post('connection.php',{}, function(output) { element.html(output); }); } })($) But it for some reason is not working.. i am puzzled
0
[ 2, 10922, 108, 52, 17206, 13, 7, 1565, 7, 487, 8190, 93, 800, 3726, 3726, 31, 589, 749, 20, 164, 51, 10922, 108, 20, 5844, 14, 4520, 56, 32, 25, 227, 37, 145, 28, 45, 5579, 5, 22, 5910, 27567, 22, 6, 9, 915, 18527, 5831, 5, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Same Login Authentication for browser and android app using Servlet === Hi I am building a Login Module for android native app.There is a login module for the website. I want to use same servlet to validate Userid and password, both for browser and android app. I want to 1) Redirect user to a new jsp page if the user logs in thru browser 2) I want to send a success/error response code to android app if he requests thru the app. i am good with redirecting user to a new jsp. but how to check if user logs in thru android app.? Thanks
0
[ 2, 205, 6738, 108, 27963, 26, 16495, 17, 13005, 4865, 568, 13, 10321, 1336, 800, 3726, 3726, 4148, 31, 589, 353, 21, 6738, 108, 12613, 26, 13005, 1275, 4865, 9, 1887, 25, 21, 6738, 108, 12613, 26, 14, 2271, 9, 31, 259, 20, 275, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
how to remove whitespace and carriage return in xml using xstream === I am trying to linearize (remove whitespaces and carriage return) to compact XML. Input is <?xml version="1.0" encoding="UTF-8"?> <books> <book> <title>Basic XML</title> <price>100</price> <qty>5</qty> </book> <book> <title>Basic Java</title> <price>200</price> <qty>15</qty> </book> </books> Output is as follows. <byte-array id="1">77u/PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4gDQo8Ym9va3M+IA0KICAg PGJvb2s+IA0KICAgICAgIDx0aXRsZT5CYXNpYyBYTUw8L3RpdGxlPiANCiAgICAgICA8cHJpY2U+ MTAwPC9wcmljZT4gDQogICAgICAgPHF0eT41PC9xdHk+IA0KICAgPC9ib29rPiANCiAgIDxib29r PiANCiAgICAgPHRpdGxlPkJhc2ljIEphdmE8L3RpdGxlPiANCiAgICAgPHByaWNlPjIwMDwvcHJp Y2U+IA0KICAgICA8cXR5PjE1PC9xdHk+IA0KICAgPC9ib29rPiANCjwvYm9va3M+</byte-array> Code to convert is as follows. public class XMLCompactTest { public void testCompact() throws SAXException, IOException, ParserConfigurationException { final InputStream is = XMLCompactTest.class.getResourceAsStream("/example.xml"); final byte[] bytes = IOUtils.toByteArray(is); final byte[] compactedBytes = compactXml(bytes); final String after = new String(compactedBytes); System.out.println(after); } public static byte[] compactXml(final byte[] value) throws SAXException, IOException, ParserConfigurationException { final ByteArrayOutputStream bout = new ByteArrayOutputStream(); final XStream xs = new XStream(); xs.autodetectAnnotations(true); xs.setMode(XStream.ID_REFERENCES); //xs.marshal(value, new CompactWriter(new OutputStreamWriter(bout, "UTF-8"))); xs.marshal(value, new CompactWriter(new OutputStreamWriter(bout))); return bout.toByteArray(); } } Any help is very much appreciated, I have referred to other answers that deal with compacting xml and they do not seem to work for me. I am using xstream 1.4.3. I am expecting a single line compacted and decoded xml. Kind Regards.
0
[ 2, 184, 20, 4681, 359, 5582, 17, 7274, 788, 19, 23504, 568, 993, 11260, 800, 3726, 3726, 31, 589, 749, 20, 6745, 2952, 13, 5, 99, 16598, 359, 5582, 18, 17, 7274, 788, 6, 20, 8285, 23504, 9, 6367, 25, 13, 1, 60, 396, 8184, 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...
class-like closure in python3 using locals === I found this article look interesting http://okmij.org/ftp/Scheme/oop-in-fp.txt So I tried to write a class-like closure like this: def clos(x,y): def getx(): print(x) def gety(): print(y) def setx(i): nonlocal x x = i def sety(i): nonlocal y y = i lc = locals() return lambda x,*y:lc[x](*y) k=clos(1,2) k("getx") k("gety") k("setx",2) k("getx") However, I think the ``lc = locals()`` looks clunky. But I can't use ``return lambda x,*y:locals()[x](*y)`` in the following sentence as it would construct a different environment. Is there any trick to make it look more simple?
0
[ 2, 718, 8, 1403, 7790, 19, 20059, 240, 568, 375, 18, 800, 3726, 3726, 31, 216, 48, 2002, 361, 4883, 7775, 6903, 3085, 79, 9999, 9, 5583, 118, 3072, 306, 118, 7526, 790, 118, 21709, 8, 108, 8, 12087, 9, 38, 396, 38, 86, 31, 794...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 populate a view model with static data === I have a Controller that I am using to pass a list of `JSON` data to my view. Currently I'm using `Linq to Entities` to populate the Viewmodel now but since it is a static list of only 15 pairs, I want to hard code the Viewmodel but I'm not sure how to do that. Here is my Controller public JsonResult GetSites() { var sites = context.vAaiomsSites.Select(s => new vAaiomsSitesVM { ID = s.ID, SiteName = s.SiteName }).OrderBy(s => s.SiteName); return Json(sites, JsonRequestBehavior.AllowGet); } I just need an array like this: SiteID: 1, SiteName : Barter Island SiteID: 2, SiteName: Cape Lisburne ....12 more times.
0
[ 2, 184, 107, 31, 1675, 12383, 21, 1418, 1061, 29, 12038, 1054, 800, 3726, 3726, 31, 57, 21, 9919, 30, 31, 589, 568, 20, 1477, 21, 968, 16, 13, 1, 728, 528, 1, 1054, 20, 51, 1418, 9, 871, 31, 22, 79, 568, 13, 1, 1226, 1251, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 run nohup as a different user without spawning two proceses? === I'm trying to nohup a command and run it as a different user, but every time I do this two processes are spawned. For example: $ nohup su -s /bin/bash nobody -c "my_command" > outfile.txt & This definitely runs my_command as nobody, but there's an extra process that I don't want to shown up: $ ps -Af . . . root ... su -s /bin/bash nobody my_command nobody ... my_command And if I kill the root process, the nobody process still lives... but is there a way to not run the root process at all? Since getting the id of my_command and killing it is a bit more complicated.
0
[ 2, 184, 107, 31, 485, 90, 252, 576, 28, 21, 421, 4155, 366, 27487, 81, 895, 5052, 160, 60, 800, 3726, 3726, 31, 22, 79, 749, 20, 90, 252, 576, 21, 1202, 17, 485, 32, 28, 21, 421, 4155, 15, 47, 352, 85, 31, 107, 48, 81, 510...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Having trouble sett java.library.path for Jython === I'm working with some legacy code at work. Trying to run on of the python scripts in our code via Jython, I'm getting an UnsatisfiedLinkError. I've tried to use the "-D" option to set the java.class.path option, but it doesn't seem to resolve things. For the following example, `Durandal.jar` is available under `C:\scm\main\core\isidurandal\durandal\build` "C:\Program Files\Java\jdk1.6.0_31\bin\java.exe" -Xint "-Dpython.path=c:\scm\main\core\isidurandal\durandal\scripts\lib" "-Dpython.home=c:\bin\jython2.5.2" "-Djava.library.path=c:\scm\main\core\isidurandal\durandal\build" -classpath "c:\bin\jython2.5.2\jython.jar;c:\scm\main\core\isidurandal\durandal\build\durandal.jar;c:\scm\main\core\isidurandal\japanese\build\durandalJapanese.jar;c:\scm\main\core\isidurandal\biometrics\build\MtiBiometrics.jar" org.python.util.jython tools\alignSequences.py ========================================================= Monolithic library init failed with UnsatisfiedLinkError: java.lang.UnsatisfiedLinkError: no durandal in java.library.path at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1738) at java.lang.Runtime.loadLibrary0(Runtime.java:823) at java.lang.System.loadLibrary(System.java:1028) at com.interactivesys.durandal.base.Library.<clinit>(Unknown Source) at com.interactivesys.durandal.recognition.Library.<clinit>(Unknown Sour ce) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:247) at org.python.core.Py.loadAndInitClass(Py.java:895) at org.python.core.Py.findClassInternal(Py.java:830) at org.python.core.Py.findClassEx(Py.java:881) at org.python.core.packagecache.SysPackageManager.findClass(SysPackageMa nager.java:133) at org.python.core.packagecache.PackageManager.findClass(PackageManager. java:28) at org.python.core.packagecache.SysPackageManager.findClass(SysPackageMa nager.java:122) at org.python.core.PyJavaPackage.__findattr_ex__(PyJavaPackage.java:137) at org.python.core.PyObject.__findattr__(PyObject.java:863) at org.python.core.imp.import_name(imp.java:849) at org.python.core.imp.importName(imp.java:884) at org.python.core.ImportFunction.__call__(__builtin__.java:1220) at org.python.core.PyObject.__call__(PyObject.java:357) at org.python.core.__builtin__.__import__(__builtin__.java:1173) at org.python.core.imp.importFromAs(imp.java:978) at org.python.core.imp.importFrom(imp.java:954) at org.python.pycode._pyx0.f$0(tools\alignSequences.py:18) at org.python.pycode._pyx0.call_function(tools\alignSequences.py) at org.python.core.PyTableCode.call(PyTableCode.java:165) at org.python.core.PyCode.call(PyCode.java:18) at org.python.core.Py.runCode(Py.java:1261) at org.python.util.PythonInterpreter.execfile(PythonInterpreter.java:235 ) at org.python.util.jython.run(jython.java:247) at org.python.util.jython.main(jython.java:129) Traceback (most recent call last): File "tools\alignSequences.py", line 1, in <module> from com.interactivesys.durandal.recognition import Library java.lang.UnsatisfiedLinkError: com.interactivesys.durandal.base.ResourceLocator .resolvePath(Ljava/lang/String;)Ljava/lang/String; at com.interactivesys.durandal.base.ResourceLocator.resolvePath(Native M ethod) at com.interactivesys.durandal.base.Library.<clinit>(Unknown Source) at com.interactivesys.durandal.recognition.Library.<clinit>(Unknown Sour ce) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:247) at org.python.core.Py.loadAndInitClass(Py.java:895) at org.python.core.Py.findClassInternal(Py.java:830) at org.python.core.Py.findClassEx(Py.java:881) at org.python.core.packagecache.SysPackageManager.findClass(SysPackageMa nager.java:133) at org.python.core.packagecache.PackageManager.findClass(PackageManager. java:28) at org.python.core.packagecache.SysPackageManager.findClass(SysPackageMa nager.java:122) at org.python.core.PyJavaPackage.__findattr_ex__(PyJavaPackage.java:137) at org.python.core.PyObject.__findattr__(PyObject.java:863) at org.python.core.imp.import_name(imp.java:849) at org.python.core.imp.importName(imp.java:884) at org.python.core.ImportFunction.__call__(__builtin__.java:1220) at org.python.core.PyObject.__call__(PyObject.java:357) at org.python.core.__builtin__.__import__(__builtin__.java:1173) at org.python.core.imp.importFromAs(imp.java:978) at org.python.core.imp.importFrom(imp.java:954) at org.python.pycode._pyx0.f$0(tools\alignSequences.py:18) at org.python.pycode._pyx0.call_function(tools\alignSequences.py) at org.python.core.PyTableCode.call(PyTableCode.java:165) at org.python.core.PyCode.call(PyCode.java:18) at org.python.core.Py.runCode(Py.java:1261) at org.python.util.PythonInterpreter.execfile(PythonInterpreter.java:235 ) at org.python.util.jython.run(jython.java:247) at org.python.util.jython.main(jython.java:129) java.lang.UnsatisfiedLinkError: java.lang.UnsatisfiedLinkError: com.interactives ys.durandal.base.ResourceLocator.resolvePath(Ljava/lang/String;)Ljava/lang/Strin g; My understanding is that this error generally happens when one tries to access a library which is not in the class path, but I think I've set it correctly on the command line. Then again, I'm also not yet very familiar with Jython (not horribly familiar with Java or Python), so I'm somewhat at sea.
0
[ 2, 452, 2572, 309, 38, 8247, 9, 1210, 2559, 622, 9, 8353, 26, 487, 93, 11570, 800, 3726, 3726, 31, 22, 79, 638, 29, 109, 7780, 1797, 35, 170, 9, 749, 20, 485, 27, 16, 14, 20059, 17505, 19, 318, 1797, 1197, 487, 93, 11570, 15, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
mapping incidents w/in county to visualize card (w/o providing specific location) === I am trying to make a map following the spread of a plant disease. I can shade the counties in the states where the disease has been found. I would like to show the disease incidents w/in the county. I am not allowed to provide address information beyond county. I played around with giving all incidents in a county the same zip code but I only get a single card to show instead of a card for all incidents in a county. I would like to be able to visualize a card for each disease incident and to filter by year, plant host, etc. I haven’t been able to find a tutorial for providing “dummy” location information. Any ideas? Thanks!
1
[ 2, 13305, 11516, 619, 118, 108, 271, 20, 3458, 2952, 2056, 13, 5, 499, 118, 111, 2674, 1903, 1474, 6, 800, 3726, 3726, 31, 589, 749, 20, 233, 21, 2942, 249, 14, 1789, 16, 21, 1321, 2515, 9, 31, 92, 7546, 14, 4413, 19, 14, 202,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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++ How do i run makefile output === C++ How do i run makefile output Below is my MakeFile, I want to ask how do i run my unitTest.cpp, as because when i MakeFile with NetBean, using the MakeFile below, main.exe is actually the main.cpp output BUT I want to run the output of unitTest.cpp How do i run unitTest.cpp # ExampleTests Project SRCS = main.cpp currencyConverter.cpp unitTest.cpp HDRS = currencyConverter.h unitTest.h PROJ = main # Remaining lines shouldn't need changing # Here's what they do: # - rebuild if any header file or this Makefile changes # - include CppUnit as dynamic library # - search /opt/local for MacPorts # - generate .exe files for Windows # - add -enable-auto-import flag for Cygwin only CC = g++ OBJS = $(SRCS:.cpp=.o) APP = $(PROJ).exe CFLAGS = -c -g -Wall -I/opt/local/include ifeq (,$(findstring CYGWIN,$(shell uname))) LDFLAGS = -L/opt/local/lib else LDFLAGS = -L/opt/local/lib -enable-auto-import endif LIBS = -lcppunit -ldl all: $(APP) $(APP): $(OBJS) $(CC) $(LDFLAGS) $(OBJS) -o $(APP) $(LIBS) %.o: %.cpp $(HDRS) $(CC) $(CFLAGS) $< -o $@ clean: rm -f *.o $(APP)
0
[ 2, 272, 20512, 184, 107, 31, 485, 233, 16877, 5196, 800, 3726, 3726, 272, 20512, 184, 107, 31, 485, 233, 16877, 5196, 1021, 25, 51, 233, 16877, 15, 31, 259, 20, 1349, 184, 107, 31, 485, 51, 1237, 10543, 9, 150, 3421, 15, 28, 185...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 yield results from a nested Python generator function? === I have a function which yields results as it downloads them. For the purposes of this question, lets say I yield a sting once every second but I want a convenience function to wrap my generator: import time def GeneratorFunction(max_val): for i in range(0,5): time.sleep(1) yield "String %d"%i def SmallGenerator(): yield GeneratorFunction(3) for s in SmallGenerator(): print s ...why doesn't that just print the 5 strings I'm expecting? Instead it appears to return the generator functio: <generator object GeneratorFunction at 0x020649B8> How can I get this to yield the strings as a normal generator function would?
0
[ 2, 184, 107, 31, 11537, 1736, 37, 21, 5618, 69, 20059, 15286, 1990, 60, 800, 3726, 3726, 31, 57, 21, 1990, 56, 18733, 1736, 28, 32, 7121, 18, 105, 9, 26, 14, 4612, 16, 48, 1301, 15, 6884, 395, 31, 11537, 21, 8210, 382, 352, 15...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How to animate a tabbarbutton image === I have a toolBarItem which calls a save action on a database. I would really much like to change the image of the item (a cabinet) dynamically so that a drawer opens, a label is animated "inside" and then it closes. Very much like the trash item on the mail app animation. I know how to make a UIView pop-up by scaling it up and down on an animation on a given times given in an array (together with an array of CT scale), so I'm guessing it could be done more or less the same way. Does anyone know about an example of who to accomplish that?. Back on xcode 4.1 i was able to highlight the button while the label was moving, but I cannot do that anymore (somehow I did add a normal button on the toolbarItem, which I cannot do anymore). Thanks in advance!
0
[ 2, 184, 20, 14487, 591, 21, 6523, 1850, 811, 444, 1961, 800, 3726, 3726, 31, 57, 21, 5607, 1850, 2119, 79, 56, 3029, 21, 2079, 1028, 27, 21, 6018, 9, 31, 83, 510, 212, 101, 20, 753, 14, 1961, 16, 14, 9101, 13, 5, 58, 3413, 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...
Get Google Analytics tracking on an IFrame === I have a Youtube video embedded on my page and I want to be able to track how many people click on or play the video. Normally I would use the <a> tag and track it using that, but I have not found any useful information on how to do this when using IFrames. Please let me know if you can help.
0
[ 2, 164, 8144, 26320, 10353, 27, 40, 31, 8361, 800, 3726, 3726, 31, 57, 21, 7330, 763, 12138, 27, 51, 2478, 17, 31, 259, 20, 44, 777, 20, 792, 184, 151, 148, 10840, 27, 54, 418, 14, 763, 9, 4147, 31, 83, 275, 14, 13, 1, 58, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
tar exiting with no message, not creating archive, and exit status 0 === I'm trying to use the following line to extract the first file in a directory: tar xzvf `ls -1 | head -n1 | tail -1` --force-local For some reason, tar simply exits without throwing an error and without creating the archive. If I manually type the filename, it works fine. The only potential issue I can see is that my filenames contain colons. Still, I have tried doing the same thing with mv and everything worked: mv `ls -1 | head -n1 | tail -1` newfile And the file is renamed properly. Any idea what may be the issue, or how I can further debug this?
0
[ 2, 2475, 24999, 29, 90, 2802, 15, 52, 2936, 9250, 15, 17, 4350, 1782, 713, 800, 3726, 3726, 31, 22, 79, 749, 20, 275, 14, 249, 293, 20, 10962, 14, 64, 3893, 19, 21, 16755, 45, 2475, 993, 380, 21441, 13, 1, 7532, 13, 8, 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, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Access iOS app documents directory from OS X === I'm working on an iOS app that creates some files and saves it in its documents directory. It would be really helpful for this app if I could create an OS X app that could access that apps documents directory as well as the pictures on the device. I know it's possible because of [this app][1], but I can't seem to find a way to implement it. The iOS app does need to be approved by apple, but the desktop app doesn't. With these apps I am targeting non-jailbroken iOS 5 devices and OS X Lion. Any ideas on how I could do this? A few other solutions I am considering: 1. upload the apps documents directory to iCloud and then download it on the desktop 2. upload to dropbox for auto syncing 3. make the desktop app into a server and upload from the app to the desktop over the network Those are all backup solutions, but it would be great if I could do this without having to depend on the network. [1]: http://www.macroplant.com/iexplorer/
0
[ 2, 1381, 13, 7760, 4865, 4374, 16755, 37, 13, 759, 993, 800, 3726, 3726, 31, 22, 79, 638, 27, 40, 13, 7760, 4865, 30, 9695, 109, 6488, 17, 16815, 32, 19, 82, 4374, 16755, 9, 32, 83, 44, 510, 15600, 26, 48, 4865, 100, 31, 110, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 ICS 4.0 WebView load file swf not showing === I'm trying to load a local swf into a webview. In android versions lower than ICS 4.0 it runs ok, but in tablets with 4.0 no... This is the code I'm using: WebView wv; String contentUrl; contentUrl = "file:///android_asset/mar.html"; wv = (WebView) findViewById(R.id.videoView); wv.getSettings().setJavaScriptEnabled(true); wv.getSettings().setPluginsEnabled(true); wv.getSettings().setAllowFileAccess(true); wv.setVerticalScrollBarEnabled(false); wv.setHorizontalScrollBarEnabled(false); wv.getSettings().setPluginState(PluginState.ON); wv.loadUrl(contentUrl); I searched and I tried: mWebView.setWebChromeClient(new WebChromeClient(){ public void onShowCustomView(View view, int requestedOrientation, WebChromeClient.CustomViewCallback callback){ super.onShowCustomView(view, callback); if(Build.VERSION.SDK_INT >=14) { if (view instanceof FrameLayout) { base.addView(view, new FrameLayout.LayoutParams( ViewGroup.LayoutParams.FILL_PARENT, ViewGroup.LayoutParams.FILL_PARENT, Gravity.CENTER)); base.setVisibility(View.VISIBLE); } } } }); But I don't know what is 'base'. Anyone can help me? Thanks
3
[ 2, 13005, 13, 8354, 268, 9, 387, 2741, 4725, 6305, 3893, 13, 18, 15263, 52, 3187, 800, 3726, 3726, 31, 22, 79, 749, 20, 6305, 21, 375, 13, 18, 15263, 77, 21, 2741, 4725, 9, 19, 13005, 3281, 987, 119, 13, 8354, 268, 9, 387, 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...
Authorized File access in ASP.NET Web Application === Can some one please help me to get an idea on this? I have a C# website application in which I want to do authorization for accessing the documents in website directory. If user requests for a document say pdf through a link in my website, http://www.mywebapp.com/documents/test.pdf , before opening the test.pdf in browser, I actually want to verify the user is authorized to access the pdf based on role he got. I have enabled forms authentication for the folder "documents" in IIS and system is redirecting to login page if user is not authenticated. I'm all good with that, but stuck with authorization. I can't set the roles in web.config since it would different for different users. User role is stored in httpcookie for that particular user. And in my documents folder there would be different documents targeted for different roles. Say test.pdf for role called vendor. So only vendors can access this pdf Another document form.pdf for role supplier- only users with role supplier can see this pdf . Should I write some handler to execute before loading the pdf in browser? Or when ever requests comes as /documents/ should I have a URL rewrite to execute an aspx page to verify the authorization and if authorized display the page? Can anybody please help me to get an idea on how to implement this authorization. Appreciate your help! Thanks, KK
0
[ 2, 9401, 3893, 1381, 19, 28, 306, 9, 2328, 2741, 3010, 800, 3726, 3726, 92, 109, 53, 2247, 448, 55, 20, 164, 40, 882, 27, 48, 60, 31, 57, 21, 272, 5910, 2271, 3010, 19, 56, 31, 259, 20, 107, 22677, 26, 1381, 68, 14, 4374, 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...
TypeError: 'undefined' is not a function (evaluating '$(".fancybox").fancybox()') === Working on a new version of my site but can't get fancy box to load properly: http://www.taintmovie.com/storecartloom2/ I checked for duplicate calls to jquery, but did not see any.
0
[ 2, 1001, 29992, 45, 13, 22, 1020, 13439, 22, 25, 52, 21, 1990, 13, 5, 7067, 2377, 1880, 13, 22, 4403, 5, 7, 9, 410, 10821, 5309, 7, 6, 9, 410, 10821, 5309, 5, 6, 22, 6, 800, 3726, 3726, 638, 27, 21, 78, 615, 16, 51, 689, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
rbind in R gives a weired rowname. === i have the following dataframes tt1 > tt1[2,] date close emp pred 2 1982-03-24 112.97 -1 1 and dataframe tt2 > tt2[2,] date close emp pred 2 1982-03-25 113.21 1 1 when i try to use rbind i get weird row name for the 2nd row. > rbind(tt1[2,],tt2[2,]) date close emp pred 2 1982-03-24 112.97 -1 1 21 1982-03-25 113.21 1 1 any clue has to how to get rid of that have it as 1, 2
0
[ 2, 13, 9002, 706, 19, 761, 2352, 21, 18866, 69, 3131, 7259, 9, 800, 3726, 3726, 31, 57, 14, 249, 1054, 8361, 18, 13, 38, 38, 165, 13, 1, 13, 38, 38, 165, 2558, 135, 15, 500, 1231, 543, 16453, 782, 43, 172, 2136, 8, 3601, 8, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Intercepting calls to Google Analytics === I'm want to intercept calls to Google Analytics, but don't have any clue about how to start or where to research. I know that webmasters include the Google Analytics script to their pages, however my JavaScript knowledge is non-existent. Is the script always part of the HTML file of the website you're visiting, or can it be stored as a separate JavaScript file? How could I make my browser use my own script instead of the Google one, so that I could log calls or open a pop-up telling me the site I'm visiting is trying to use the Google Analytics script? I'm not asking for a detailed walkthrough (although I definitely wouldn't mind :D). Since this is really new stuff for me, any help would be appreciated, be it a link which might help me figure it on my own, or some suggestion.
0
[ 2, 18324, 68, 3029, 20, 8144, 26320, 800, 3726, 3726, 31, 22, 79, 259, 20, 18324, 3029, 20, 8144, 26320, 15, 47, 221, 22, 38, 57, 186, 8906, 88, 184, 20, 799, 54, 113, 20, 527, 9, 31, 143, 30, 2741, 4594, 18, 468, 14, 8144, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Error executing child request for handler 'System.Web.Mvc.HttpHandlerUtil+ServerExecuteHttpHandlerWrapper'. === I know that there's already some post for this particular question but I can't figure out what I'm doing wrong. The error happens on this page : http://www.gentec-eo.com/products/thz-detectors, I can't reproduce it. I recieve an email that report this error 2 to 6 times a day, I've been looking for the solution for a while but I can't figure it out. One thing to notice is that it's **always from the same ip** : 72.14.199.4 witch I think is a google's bot. I don't get an innerexception. My code is pretty simple, the only thing that is different from the other pages is that I use Telerik's Grid to show the data with a jQuery post action. Here's my error : Message : Error executing child request for handler 'System.Web.Mvc.HttpHandlerUtil+ServerExecuteHttpHandlerWrapper'. > Stack Trace : at > System.Web.HttpServerUtility.ExecuteInternal(IHttpHandler > handler, TextWriter writer, Boolean > preserveForm, Boolean setPreviousPage, > VirtualPath path, VirtualPath > filePath, String physPath, Exception > error, String queryStringOverride) at > System.Web.HttpServerUtility.Execute(IHttpHandler > handler, TextWriter writer, Boolean > preserveForm, Boolean setPreviousPage) > at > System.Web.HttpServerUtility.Execute(IHttpHandler > handler, TextWriter writer, Boolean > preserveForm) at > System.Web.HttpServerUtilityWrapper.Execute(IHttpHandler > handler, TextWriter writer, Boolean > preserveForm) at > System.Web.Mvc.ViewPage.RenderView(ViewContext > viewContext) at > System.Web.Mvc.ViewResultBase.ExecuteResult(ControllerContext > context) at > System.Web.Mvc.ControllerActionInvoker.<>c__DisplayClass14.b__11() > at > System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter > filter, ResultExecutingContext > preContext, Func`1 continuation) at > System.Web.Mvc.ControllerActionInvoker.InvokeActionResultWithFilters(ControllerContext > controllerContext, IList`1 filters, > ActionResult actionResult) at > System.Web.Mvc.ControllerActionInvoker.InvokeAction(ControllerContext > controllerContext, String actionName) > IP : 72.14.199.4 My view : <%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<PageModel>" %> <%@ Import Namespace="SPK.CMS.Domain.Model"%> <%@ Import Namespace="Web.ViewModels"%> <%@ Import Namespace="Resources" %> <asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server"><%= Model.CurrentCategory.HeadTitle %></asp:Content> <asp:Content ID="Content3" ContentPlaceHolderID="additionnalHeadElement" runat="server"> <meta name="description" lang="fr" content="<%= Model.CurrentCategory.MetaDescription %>" /> <meta name="keywords" lang="fr" content="<%= Model.CurrentCategory.MetaKeywords %>" /> </asp:Content> <asp:Content ID="Content2" ContentPlaceHolderID="content" runat="server"> <div id="splited-content"> <div id="left-content"> <% Html.RenderPartial(MVC.Shared.Views.MenuProduct); %> </div> <div id="right-content"> <%if(!string.IsNullOrEmpty(Model.CurrentCategory.HTMLContent)){ %> <div id="product-cat-content"><%= Model.CurrentCategory.HTMLContent %></div> <%} %> <div id="product-compare"> <% if (Model.CurrentCategory.FriendlyUrl.Contains("thz-detectors")) { %> <%= Html.Telerik().Grid<ProductCompare>() .Name("GridTHz") .Columns(colums => { colums.Bound(c => c.Name).Title(Resource.MODEL).HtmlAttributes(new { @class = "center-text" }).ClientTemplate("<a href=\"" + Url.Action(MVC.Page.Product()) + "/<#=ProductName#>" + "/\" ><#=Name#></a>"); colums.Bound(c => c.Pmax).Title(Resource.Pmax).HeaderHtmlAttributes(new { @class = "center-text" }).ClientTemplate("<#=PmaxFormated#>"); colums.Bound(c => c.Pmin).Title(Resource.Pmin).HeaderHtmlAttributes(new { @class = "center-text" }).ClientTemplate("<#=PminFormated#>"); colums.Bound(c => c.Fmin).Title(Resource.Fmin).HeaderHtmlAttributes(new { @class = "center-text" }).ClientTemplate("<#=Fmin#> Hz"); colums.Bound(c => c.Fmax).Title(Resource.Fmax).HeaderHtmlAttributes(new { @class = "center-text" }).ClientTemplate("<#=Fmax#> Hz"); colums.Bound(c => c.AnalogOutput).Title(Resource.ANALOG_OUTPUT).HeaderHtmlAttributes(new { @class = "center-text" }); colums.Bound(c => c.SensorType).Title(Resource.SENSOR_TYPE).HeaderHtmlAttributes(new { @class = "center-text" }); colums.Bound(c => c.Surface).Title(Resource.APERTURE).HeaderHtmlAttributes(new { @class = "center-text" }).ClientTemplate("<#=Aperture#>"); }) .DataBinding(d => d.Ajax().Select("ListProductCompare", "Page", new { categoryName = Model.CurrentCategory.Name})) .Sortable() %> <%}%> </div> </div> <div class="clear"></div> </div> <%= Html.Telerik().ScriptRegistrar().jQuery(false).DefaultGroup(g => g.DefaultPath("~/Content/javascript/2010.1.309")) %> <script type="text/javascript">document.write(unescape('%3Cscript type="text/javascript" src="' + document.location.protocol + '//dnn506yrbagrg.cloudfront.net/pages/scripts/0010/6692.js"%3E%3C%2Fscript%3E'))</script> </asp:Content> My Controller'S action : public virtual ActionResult ProductCategory(string productCategory) { if (string.IsNullOrEmpty(productCategory)) return Home(); var currentCategory = _productCatRepo.GetByUrl(productCategory); var pageModel = new PageModel(); if (currentCategory == null) { return Page404(); } pageModel.CurrentCategory = currentCategory; BuildMenusAndBreadCrumb(pageModel); GetHeader(pageModel, currentCategory); ViewData.Model = pageModel; return View(); } [AcceptVerbs(HttpVerbs.Post)] [GridAction] public virtual ActionResult ListProductCompare(string categoryName) { var gridModel = new GridModel<ProductCompare>(); gridModel.Data = _productCompareRepo.GetByCategory(categoryName); return View(gridModel); } Thanks a lot for the help!
0
[ 2, 7019, 25836, 850, 3772, 26, 24641, 13, 22, 10724, 9, 14113, 9, 79, 8990, 9, 21127, 3203, 1252, 14255, 2430, 10321, 106, 1706, 17194, 591, 21127, 3203, 1252, 499, 525, 8763, 22, 9, 800, 3726, 3726, 31, 143, 30, 80, 22, 18, 614, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How can I export tables to excel from a webpage === Whats the best way to export tables to excel from a webpage. I want the export to contain all the formatting and colours.
0
[ 2, 184, 92, 31, 7487, 7484, 20, 20700, 37, 21, 2741, 6486, 800, 3726, 3726, 98, 18, 14, 246, 161, 20, 7487, 7484, 20, 20700, 37, 21, 2741, 6486, 9, 31, 259, 14, 7487, 20, 3717, 65, 14, 2595, 1203, 17, 8739, 9, 3, 0, 0, 0, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
Why is the name of my computer wrong in terminal? === I just transfered all of my files and settings over to a new laptop using Migration Assistant (on a mac). The name of my computer in terminal is wrong for some reason. It's unknown20c9d042dc93 The prompt looks like this Last login: Thu Jul 19 19:46:15 on ttys001 unknown20c9d042dc93:~ Ryan$ How do I change the name to what it usually is, Ryan's Macbook?
2
[ 2, 483, 25, 14, 204, 16, 51, 1428, 1389, 19, 3855, 60, 800, 3726, 3726, 31, 114, 2617, 69, 65, 16, 51, 6488, 17, 12410, 84, 20, 21, 78, 12294, 568, 8443, 1482, 13, 5, 218, 21, 1572, 6, 9, 14, 204, 16, 51, 1428, 19, 3855, 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...
How to detect Azure/Amazon VM === Is there any way to detect, in general, if your code is executing on an Azure or Amazon virtual machine. I am not referring to some sort of web or worker role in particular, I mean given any executable, is there anything that resolves that machine to a cloud VM - for example under Azure there is no domain so i cannot simply rely on a domain name.
0
[ 2, 184, 20, 9092, 25715, 118, 3812, 6931, 13, 20147, 800, 3726, 3726, 25, 80, 186, 161, 20, 9092, 15, 19, 297, 15, 100, 154, 1797, 25, 25836, 27, 40, 25715, 54, 8059, 6599, 1940, 9, 31, 589, 52, 7378, 20, 109, 2058, 16, 2741, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 this message bubble to be on the right side? === I have this as my layout for an item in my listview: <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="wrap_content" android:layout_height="wrap_content" android:gravity="right" android:background="@drawable/msgbox_self" android:paddingLeft="7dip" > <RelativeLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:id="@+id/layout"> <ImageView android:id="@+id/pending" android:layout_height="fill_parent" android:layout_width="wrap_content" android:layout_marginLeft="2dip" android:src="@drawable/ic_sms_mms_pending" android:visibility="gone" /> <TextView android:id="@+id/body" android:text="@+id/body" android:singleLine="false" android:paddingLeft="@dimen/message_item_text_padding_left_right" android:paddingRight="@dimen/message_item_text_padding_left_right" android:paddingTop="@dimen/message_item_text_padding_top" android:layout_width="wrap_content" android:layout_height="wrap_content" android:linksClickable="false" android:textAppearance="?android:attr/textAppearanceSmall" android:textColor="#ff000000" android:textSize="16sp" /> <RelativeLayout android:layout_height="wrap_content" android:layout_width="wrap_content" android:layout_below="@id/body" android:id="@+id/picture_layout" android:orientation="vertical" > <ImageView android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/picture" android:visibility="gone" android:maxWidth="178dip" android:maxHeight="178dip" android:adjustViewBounds="true" android:background="@android:drawable/picture_frame" android:layout_centerHorizontal="true"/> </RelativeLayout> <TextView android:paddingRight="@dimen/message_item_text_padding_left_right" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_below="@id/picture_layout" android:paddingLeft="3dip" android:textAppearance="?android:attr/textAppearanceSmall" android:id="@+id/date" android:text="@+id/date" android:singleLine="true" /> </RelativeLayout> </RelativeLayout> I want the bubble though to be on the right side. This is a layout for a message bubble. I am trying to put it on the right side like the iPhone conversations. I have tried every possibly thing I can think of relating to putting it on the right side instead of the left. Does anyone see anything wrong with my layout? Please help! Thanks
0
[ 2, 184, 20, 164, 48, 2802, 10937, 20, 44, 27, 14, 193, 270, 60, 800, 3726, 3726, 31, 57, 48, 28, 51, 9106, 26, 40, 9101, 19, 51, 968, 4725, 45, 13, 1, 7256, 3366, 4414, 1320, 23504, 2172, 45, 290, 18524, 3726, 7, 21127, 6903, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Rails - Nearby cities in existing query which joins city table === I have the following models: class User has_one :player belongs_to :city end class Player belongs_to :user end class City has_many :users end Each City has a **latitude** and **longitude** attributes. I have the following query (it's a little bit longer, but what matters is the city part) that I use to get players which associated users are from a particular city. As this: def self.search(city) self.includes(:user => :city). where(['cities.name = ?, "%#{city}%"]) end How would I change this query to get professors which users associated cities are near by (10 kilometers for example) the given city?
0
[ 2, 2240, 18, 13, 8, 1754, 1920, 19, 3149, 25597, 56, 10612, 136, 859, 800, 3726, 3726, 31, 57, 14, 249, 2761, 45, 718, 4155, 63, 1, 849, 13, 45, 14049, 7034, 1, 262, 13, 45, 5788, 241, 718, 517, 7034, 1, 262, 13, 45, 16704, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 file uploads - move or copy the file? === When I upload a file into django, it first goes through the UploadHandlers. i have used this to write a progress bar. when the upload is complete, the 'upload file' view gets called. The request object will have either an InMemoryUploadedFile or a temporary file on disk. Here is my question: The docs suggest to copy the file chunk by chunk. For a large file, would this not take a long time (with the progress bar stuck at 100%)? Would it not be better to do a 'move' operation? eg on windows you can move a file almost instantly within the same drive letter, copying takes a long time. i believe the same applies on unix systems.
0
[ 2, 3857, 14541, 3893, 71, 8294, 18, 13, 8, 780, 54, 4344, 14, 3893, 60, 800, 3726, 3726, 76, 31, 71, 8294, 21, 3893, 77, 3857, 14541, 15, 32, 64, 1852, 120, 14, 71, 8294, 3203, 1252, 18, 9, 31, 57, 147, 48, 20, 2757, 21, 345...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Prevent Inserting same combination of Component and template : === In a page when we will click the **component Presentation tab** we can see the component and template listed there.On clicking of **Insert** button just below that, it will open another window "**Insert component presentation**" there also we will have **Insert** and close button.So now what i need to do While inserting i need to check whether the combination of **selected Component and Template** is already present there on page or not. If yes then it should prevent inserting the same with a popup like "this combination is already present, select other componet". Any idea how can i proceed.
0
[ 2, 2501, 14692, 68, 205, 3733, 16, 5912, 17, 22894, 13, 45, 800, 3726, 3726, 19, 21, 2478, 76, 95, 129, 10840, 14, 13, 1409, 11103, 218, 2291, 6364, 6523, 1409, 95, 92, 196, 14, 5912, 17, 22894, 1510, 80, 9, 218, 25590, 16, 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...
join in mysql need to return single record for each primary key === I have two tables for properties and images Which have the same column name like id,name in both tables. parent column is a foreign key in images. SELECT DISTINCT(A.id),A.name,B.name AS img FROM `jos_properties_products` AS A LEFT JOIN `jos_properties_images` AS B ON A.id = B.parent ![enter image description here][1] From the above i want to remove duplicate. [1]: http://i.stack.imgur.com/CuhOZ.png
0
[ 2, 1865, 19, 51, 18, 22402, 376, 20, 788, 345, 571, 26, 206, 1256, 1246, 800, 3726, 3726, 31, 57, 81, 7484, 26, 3704, 17, 3502, 56, 57, 14, 205, 4698, 204, 101, 4924, 15, 7259, 19, 156, 7484, 9, 4766, 4698, 25, 21, 1228, 1246,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
how to make jprobe not die when try to profile jboss service with huge call load? === I am trying to use jprobe to profile one service based on jboss 4.2.3, i made huge call load to this service, but jprobe has no responding to operation during/after the call load, for example request GC, request snapshot, etc. but it has response to the menu operation. i tried to adjust jprobe conf file jprobe.ini -XX:MaxPermSize=4096m, but looks it cannot help. so what parameters can i adjust to make this works? thanks, Emre
0
[ 2, 184, 20, 233, 487, 2740, 863, 52, 1327, 76, 1131, 20, 5296, 487, 10349, 18, 365, 29, 2329, 645, 6305, 60, 800, 3726, 3726, 31, 589, 749, 20, 275, 487, 2740, 863, 20, 5296, 53, 365, 432, 27, 487, 10349, 18, 268, 9, 135, 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 handle one session per tabpage when switching between them === I read somewhere that it was a good idea to use a new Session for every Form/Presenter in a C# Desktop application. So I decided to close the session every time the Tab Index changes. Any DB-activity opens a new session. I have a treeview in each Tab and the Data loads exactly when it should (when the corresponding Node is opened for example) The only problem is when I leave a Tabpage and a Tree has some opened nodes and then I get back. There are two different scenarios: - I click at a leaf node that I already had a look at before I left and revisited that tab - I click at a leaf node that has never been looked at in that program run (but we can see it because the parent node is expanded) In the first scenario everything is ok. In the second scenario I get a LazyInitialization Exception. 1) Can I force the node to Load the data or to remember the data although the sessions is closed? I don't like the idea that I use only one session for the program. 2) Do you think it might work if I remembered the tree State, collapsed it and reexpanded the necessary nodes? Would it load the data like it did when the user opened it? Best regards, Expecto
0
[ 2, 184, 20, 3053, 53, 3723, 416, 6523, 6486, 76, 13027, 128, 105, 800, 3726, 3726, 31, 1302, 3493, 30, 32, 23, 21, 254, 882, 20, 275, 21, 78, 3723, 26, 352, 505, 118, 3914, 106, 19, 21, 272, 5910, 17404, 3010, 9, 86, 31, 868, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
TMS DBAdvMemo add marker === I am a little stuck with this memo component from TMS. First, I do not know how do you actually select a line (clicking on the line number in the gutter) ? Second, how do you add a marker next to the line in the gutter ? I tried : procedure TForm1.BitBtn1Click(Sender: TObject); begin dbAdvMemo1.MarkerList.AddMarker(LineIdx, ImageIdx); end; But it does not seem to work.... Is there a way I can change the line text color when I click on the gutter line number (for that line) ?
0
[ 2, 13, 38, 79, 18, 13, 43, 5989, 20147, 15441, 3547, 13289, 800, 3726, 3726, 31, 589, 21, 265, 4549, 29, 48, 22236, 5912, 37, 13, 38, 79, 18, 9, 64, 15, 31, 107, 52, 143, 184, 107, 42, 1121, 5407, 21, 293, 13, 5, 150, 10129,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Using ifconfig to check whether I'm on local WiFi or 3G === For a bash script I want to determin whether my device has WiFi. The easiest way for me would be ifconfig and some regex. So I want to check if my interface en0 has a valid IP or not. ifconfig en0 | grep inet gives me `inet 192.167.1.196 netmask 0xffffff00 broadcast 192.167.1.255` Thats as far as I come. Now I need to get the second string element and validate it as an IP. But thats as far as I come. Thanks for your support!
0
[ 2, 568, 100, 14093, 2816, 20, 2631, 1472, 31, 22, 79, 27, 375, 4807, 1707, 54, 203, 263, 800, 3726, 3726, 26, 21, 13158, 3884, 31, 259, 20, 15190, 2160, 1472, 51, 3646, 63, 4807, 1707, 9, 14, 27237, 161, 26, 55, 83, 44, 100, 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...
ios reachability === is there a possibilty to check whether the iphone is connected via Wlan, via 3g, via 4g or via 2g?! I know there is a reachability class from apple, but with that you can only check if Wlan or wwan... switch (netStatus) { case NotReachable: { statusString = @"Access Not Available"; imageView.image = [UIImage imageNamed: @"stop-32.png"] ; //Minor interface detail- connectionRequired may return yes, even when the host is unreachable. We cover that up here... connectionRequired= NO; break; } case ReachableViaWWAN: { statusString = @"Reachable WWAN"; imageView.image = [UIImage imageNamed: @"WWAN5.png"]; break; } case ReachableViaWiFi: { statusString= @"Reachable WiFi"; imageView.image = [UIImage imageNamed: @"Airport.png"]; break; } }
0
[ 2, 13, 7760, 1470, 4091, 800, 3726, 3726, 25, 80, 21, 351, 20294, 9168, 1084, 20, 2631, 1472, 14, 21024, 25, 2587, 1197, 619, 1804, 15, 1197, 203, 263, 15, 1197, 268, 263, 54, 1197, 172, 263, 60, 187, 31, 143, 80, 25, 21, 1470, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 following code gives output as 14? Can anyone explain? === Read this question somewhere. Couldn't find the exact execution process. Can anyone explain the process. class Test { public static void main(String [] args) { int x = 11 & 9; int y = x ^ 3; System.out.println( y | 12 ); } }
1
[ 2, 184, 20, 249, 1797, 2352, 5196, 28, 513, 60, 92, 1276, 3271, 60, 800, 3726, 3726, 1302, 48, 1301, 3493, 9, 711, 22, 38, 477, 14, 5340, 5769, 953, 9, 92, 1276, 3271, 14, 953, 9, 718, 1289, 13, 1, 317, 12038, 11364, 407, 5, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How to remove or disable before and after pseudo classes? === This seems very trivial but I couldn't figure it out. Simply overriding it with `display:none` doesn't work on IE8. #selector::after { display: none; } I am modifying a theme that's using before and after pseudo classes to add image sprites.
0
[ 2, 184, 20, 4681, 54, 1460, 579, 115, 17, 75, 8452, 2684, 60, 800, 3726, 3726, 48, 2206, 253, 13, 19712, 47, 31, 711, 22, 38, 1465, 32, 70, 9, 1659, 84, 5175, 68, 32, 29, 13, 1, 2906, 5438, 45, 15746, 1, 1437, 22, 38, 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...
Equivalent of mongoDB shell's db.stats() in php and python === I can see the statistics from Mongo shell as db.stats() or db.collection_name.stats() How do i view statistics of a database or a collection from PHP and python.
0
[ 2, 4602, 16, 3521, 5474, 220, 3593, 22, 18, 13, 9007, 9, 10631, 18, 5, 6, 19, 13, 26120, 17, 20059, 800, 3726, 3726, 31, 92, 196, 14, 5818, 37, 3521, 839, 3593, 28, 13, 9007, 9, 10631, 18, 5, 6, 54, 13, 9007, 9, 15015, 872, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Haversine Formula in CakePHP paginate fields === This is my first post on this site, so please be kind. I have no trouble making this work using the find() method, but when I try to run it using the paginate component, no luck. I am simply trying to run a Haversine formula in the fields options to calculate distance. In the Cake Book, it says "You can also include other find() options, such as fields:". There is no caveat mentioned. So, this is what I am trying to run: $this->paginate = array( 'joins' => array( array( 'table' => 'ride_types', 'alias' => 'RideTypes', 'type' => 'inner', 'conditions'=>array('RideTypes.id = Rides.ride_type') ) ), 'group' => array( "Rides.id HAVING distance < $filter_radius AND ride_time >= '$filter_earliest_time' AND ride_time <= '$filter_latest_time' AND ride_date >= '$filter_earliest_date' AND ride_date <= '$filter_latest_date'" ), 'fields' => array( "( 3959 * acos( cos( radians($filter_lat) ) * cos( radians( Rides.lat ) ) * cos( radians( Rides.lng ) - radians($filter_lng) ) + sin( radians($filter_lat) ) * sin( radians( Rides.lat ) ) ) ) AS distance" ), 'limit' => 5, 'page' => $paginate_page, 'order' => array('Rides.start_time DESC'), ); $rides = $this->paginate('Rides',$options['conditions']); I get this error: Error: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'distance' in 'having clause' SQL Query: SELECT COUNT(*) AS `count` FROM `velobuddies`.`rides` AS `Rides` inner JOIN `velobuddies`.`ride_types` AS `RideTypes` ON (`RideTypes`.`id` = `Rides`.`ride_type`) WHERE 1 = 1 GROUP BY `Rides`.`id` HAVING distance < 5 Again, if I apply all these exact same options to the find('all') method, it works perfectly, so I know the logic is correct... or at least workable. So what is going on here?
0
[ 2, 57, 1224, 1149, 3729, 19, 8390, 26120, 19006, 17939, 2861, 800, 3726, 3726, 48, 25, 51, 64, 678, 27, 48, 689, 15, 86, 2247, 44, 825, 9, 31, 57, 90, 2572, 544, 48, 170, 568, 14, 477, 5, 6, 2109, 15, 47, 76, 31, 1131, 20, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
how do i auto update UI where there is a change in an observableArray? === Hello I have the following code which uses knockout.js, var allJobberDetailsArray = []; getAllJobberDetailsArray(); function getAllJobberDetailsArray() { $(function() { $.ajax({ url: 'http://example.com', type: 'GET', data: { request: "yes", getAllJobberDetailsArray: "yes" }, success: function(data) { allJobberDetailsArray = data; } }); }) } // ViewModel function JobberCheckBoxListUserControlViewModel() { var self = this; self.allJobberDetailsArray = ko.observableArray(allJobberDetailsArray); } ko.applyBindings(new JobberCheckBoxListUserControlViewModel()); any change to allJobberDetailsArray I would like to update the UI automatically say an array item is added updated or deleted i would like the UI to reflect it. How do i achieve it?
0
[ 2, 184, 107, 31, 3108, 11100, 13, 5661, 113, 80, 25, 21, 753, 19, 40, 5122, 10321, 579, 8576, 93, 60, 800, 3726, 3726, 10975, 31, 57, 14, 249, 1797, 56, 2027, 11676, 9, 728, 18, 15, 4033, 65, 1636, 17031, 546, 8682, 4964, 2787, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Is it possible? Win8/ARM (WOA) Screen capture a different app's screen === Is it possible to create an app for Win8/ARM that does screen capture (like Snagit) or screen transmission (like VNC) of *another* Win8 app? That is, the "capturing app" would have to a be a background app that captures the screen of other apps (not of itself). I can see how to do it on x86, but the isolation of apps on ARM (and lack of Windows services/desktop APIs) makes more challenging in a pure Metro fashion. Is it possible?
0
[ 2, 25, 32, 938, 60, 628, 12530, 5828, 13, 5, 6374, 58, 6, 2324, 3683, 21, 421, 4865, 22, 18, 2324, 800, 3726, 3726, 25, 32, 938, 20, 1600, 40, 4865, 26, 628, 12530, 5828, 30, 630, 2324, 3683, 13, 5, 1403, 28755, 242, 6, 54, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Minus operator in sql === I am trying to create a sql query with minus. I have query1 which returns 28 rows with 2 columns I have query2 which returns 22 row2 with same 2 columns in query 2. when I create a query query1 minus query 2 it should have only show the 28-22=6 rows. But it showing up all the 28 rows returned by query1. Please advise.
0
[ 2, 13, 15495, 6022, 19, 4444, 255, 800, 3726, 3726, 31, 589, 749, 20, 1600, 21, 4444, 255, 25597, 29, 13, 15495, 9, 31, 57, 25597, 165, 56, 4815, 1274, 11295, 29, 172, 7498, 31, 57, 25597, 135, 56, 4815, 1024, 3131, 135, 29, 205...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Running an endlessly looping animation on iOS === I have a simple UIView that draws itself using `drawRect:`. In order for the view to animate, the `drawRect` method needs to be called every say 0.05 seconds, so I use a repeating timer: timer = [NSTimer scheduledTimerWithTimeInterval:0.05 target:self selector:@selector(setNeedsDisplay) userInfo:nil repeats:YES]; I don't know too much about run loops, and threads, and all that system stuff, so I want to know if this is the correct way to run an animation? This timer repeats itself endlessly. Is this something I should be worried about? Will this block the main thread? What can I do to minimize overall impact on performance?
0
[ 2, 946, 40, 11340, 102, 5293, 68, 6236, 27, 13, 7760, 800, 3726, 3726, 31, 57, 21, 1935, 13, 5661, 4725, 30, 10802, 1145, 568, 13, 1, 3030, 7127, 11557, 45, 1, 9, 19, 389, 26, 14, 1418, 20, 14487, 591, 15, 14, 13, 1, 3030, 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...
Show system files / Show git ignore in osx === By default it is not possible to see .gitignore files in osx. What is command to reveal these files?
0
[ 2, 298, 329, 6488, 13, 118, 298, 13, 10404, 7174, 19, 13, 759, 396, 800, 3726, 3726, 34, 12838, 32, 25, 52, 938, 20, 196, 13, 9, 10404, 23565, 99, 6488, 19, 13, 759, 396, 9, 98, 25, 1202, 20, 6820, 158, 6488, 60, 3, 0, 0, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
php mysql query returning array === I'm wondering how I would issue a query from a PDO and have an array returned? Right now, I have $DBH = new PDO("mysql:host={$host};dbname={$dbname}", $user, $pass); Using a foreach loop, like so $query = "SELECT DISTINCT City FROM Locations ORDER BY City"; foreach($DBH->query($query)as $row){ echo $row['City']; } I can get all the cities printed. However, I would like to store all the cities into an array. I tried to do it like this $array = $DBH->query($query); but that didn't work at all. Any suggestions?
0
[ 2, 13, 26120, 51, 18, 22402, 25597, 2485, 7718, 800, 3726, 3726, 31, 22, 79, 5712, 184, 31, 83, 1513, 21, 25597, 37, 21, 351, 537, 17, 57, 40, 7718, 587, 60, 193, 130, 15, 31, 57, 5579, 43, 6216, 800, 78, 351, 537, 5, 7, 915...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
macro extract data block === I have worked on this problem for my entire day and can't solve it. The input data consists of several data blocks with the same number of rows and columns. Each data block has its name in the first line within the block. Besides, they are further separated by a blank row. block1 name score value a 2 3 b 3 5 c 1 6 block2 name score value a 4 6 b 7 8 c 2 6 block3 name score value a 5 4 b 7 8 c 2 9 The desired output is to extract the name and value column of each block, and then parallel them in columns. Like this: value block1 block2 block3 a 3 6 4 b 5 8 8 c 6 6 9 Thanks for your help!
0
[ 2, 9069, 10962, 1054, 1921, 800, 3726, 3726, 31, 57, 577, 27, 48, 1448, 26, 51, 1078, 208, 17, 92, 22, 38, 8402, 32, 9, 14, 6367, 1054, 2043, 16, 238, 1054, 5198, 29, 14, 205, 234, 16, 11295, 17, 7498, 9, 206, 1054, 1921, 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...
Does Microsoft Jet DB work with Entity Framework Code-First approach? === In this forum [here][1] , someone mentions that Entity Framework does not work with Access (Jet DB - .mdb). However it seems that there is a provider for Jet DB as described [here][2] Which makes me think that the only thing I need with Entity Framework is to define the follwing before I define the models: <connectionStrings> <add name="ProductContext" providerName="Microsoft.Jet.OLEDB.4.0" connectionString="Source=C:\mydatabase.mdb;Jet OLEDB:Database Password=MyDbPassword;"/> </connectionStrings> [1]: http://social.msdn.microsoft.com/Forums/en-US/adodotnetentityframework/thread/9bc427da-ccd2-4683-a5e1-7ecbb68e312a [2]: http://www.connectionstrings.com/access Does anyone know if Entity Framework works fine with Jet DB, I want to make sure it does before I start since my design document depends on this fact. Thanks
0
[ 2, 630, 7099, 4797, 13, 9007, 170, 29, 9252, 6596, 1797, 8, 3552, 2141, 60, 800, 3726, 3726, 19, 48, 5691, 636, 6836, 500, 2558, 165, 500, 13, 15, 737, 10292, 30, 9252, 6596, 630, 52, 170, 29, 1381, 13, 5, 10307, 13, 9007, 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...
Ruby - Get all files in a directory from shallower to deeper === By the magic of `Dir` I can get all files in a directory: Dir['lib/**/*.rb'] => ["lib/a.rb", "lib/foo/bar/c.rb", "lib/foo/b.rb"] But I want to iterate them from shallower to deeper. i.e. `a.rb` -> `b.rb` -> `c.rb`. Any suggestion?
0
[ 2, 10811, 13, 8, 164, 65, 6488, 19, 21, 16755, 37, 7258, 106, 20, 5891, 800, 3726, 3726, 34, 14, 2154, 16, 13, 1, 9035, 1, 31, 92, 164, 65, 6488, 19, 21, 16755, 45, 13, 9035, 2558, 22, 8326, 118, 1409, 118, 2483, 9, 7549, 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...
Disable menu bar shortcuts in Visual Studio 2010 === I'm using the Emacs plugin for Visual Studio 2010, and I'd like to liberate my meta key. When I press `Alt-foo`, I activate drop-downs on the menu bar instead of lovely Emacs commands. For example, I open the analyze menu when I try to move forward by one word, since both commands are invoked with `Alt-N`. How do I disable the menu bar `Alt-` shortcuts and fully appreciate my Emacs environment?
0
[ 2, 1460, 579, 11379, 748, 502, 4118, 18, 19, 3458, 1120, 498, 800, 3726, 3726, 31, 22, 79, 568, 14, 13, 62, 6893, 18, 10922, 108, 26, 3458, 1120, 498, 15, 17, 31, 22, 43, 101, 20, 10961, 1373, 51, 7618, 1246, 9, 76, 31, 901, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Bootstrap: Subnav does not have the same style as on demo site === My bootstrap subnav does not look the same as the one on the demo site. Here's my markup: <div class="subnav"> <ul class="nav nav-pills"> <li><a href="#demoModal">Modal</a></li> <li><a href="#demoTabs">Tabs</a></li> <li><a href="#demoAccordion">Accordion</a></li> <li><a href="#demoOther">Other</a></li> </ul> </div> and an image of what I am seeing: ![Bad][1] and here is what I am trying to replicate: ![Good][2] I tried copying the markup exactly, but to no avail. I wondered if maybe it had something to do with the parent elements being different.. so I moved mine into a "container-fluid" classed div, but that didn't help. Maybe someone here can spot something my eye missed.. [1]: http://i.stack.imgur.com/YAJ6P.png [2]: http://i.stack.imgur.com/EYAcL.png
0
[ 2, 5894, 16514, 45, 972, 18343, 630, 52, 57, 14, 205, 1034, 28, 27, 8376, 689, 800, 3726, 3726, 51, 5894, 16514, 972, 18343, 630, 52, 361, 14, 205, 28, 14, 53, 27, 14, 8376, 689, 9, 235, 22, 18, 51, 943, 576, 45, 13, 1, 1291...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 you use sockets with threading? c++ === I would like to know why i am unable to send data when using threads with sockets. I was wondering why when i send using the first method(without threads), it works, but using the second method, it fails to send data. This is my declaration : int main(int argc, char *argv[]) { int sd, rc, i; struct sockaddr_in cliAddr, remoteServAddr; struct hostent *h; h = gethostbyname(argv[1]); inet_ntoa(*(struct in_addr *)h->h_addr_list[0])); remoteServAddr.sin_family = h->h_addrtype; memcpy((char *) &remoteServAddr.sin_addr.s_addr,h->h_addr_list[0], h->h_length); remoteServAddr.sin_port = htons(REMOTE_SERVER_PORT); /* socket creation */ sd = socket(AF_INET,SOCK_DGRAM,0); /* bind any port */ cliAddr.sin_family = AF_INET; cliAddr.sin_addr.s_addr = htonl(INADDR_ANY); cliAddr.sin_port = htons(0); rc = bind(sd, (struct sockaddr *) &cliAddr, sizeof(cliAddr)); socklen_t remoteServLen = sizeof(remoteServAddr); //this is my own class to store the pointers to the following variables clientInfo ci(&sd,&rc,&remoteServLen,&remoteServAddr,&cliAddr); /*FIRST METHOD*/ char *data; char input[MAX_MSG]; std::cout << "Enter message to send (type /q to quit) : "; std::cin >> input; data = input; rc = sendto(*(ci.getSd()), data, strlen(data)+1, 0,(struct sockaddr *) ci.getCliAddr(),*(ci.getCliLen())); /*FIRST METHOD*/ /*SECOND METHOD*/ pthread_t thread[2]; int status; status = pthread_create (&thread[1], NULL, sendFunction,&ci); /*SECOND METHOD*/ } /*This is my thread method*/ void* sendFunction (void* temp) { int status; char *data; char input[MAX_MSG]; int rc; clientInfo *ci; ci = (clientInfo*)temp; status = pthread_detach (pthread_self ()); while(1) { std::cout << "Enter message to send (type /q to quit) : "; std::cin >> input; data = input; rc = sendto(*(ci->getSd()), data, strlen(data)+1, 0,(struct sockaddr *) ci->getCliAddr(),*(ci->getCliLen())); if(rc<0) { printf("Cannot send data %s \n",data); } }//end of while loop return NULL; }//end of sendFunction method :) thanks in advance! :D
0
[ 2, 184, 107, 42, 275, 18482, 18, 29, 9322, 68, 60, 272, 20512, 800, 3726, 3726, 31, 83, 101, 20, 143, 483, 31, 589, 2343, 20, 2660, 1054, 76, 568, 20396, 29, 18482, 18, 9, 31, 23, 5712, 483, 76, 31, 2660, 568, 14, 64, 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...
Launching a wizard from a button in OpenERP === I'm trying to launch a wizard from an action called from a button in OpenERP. I can launch the wizard using a side menu button just fine, but whenever I use the action in a button, I just get a couple of refreshes, without the new form opening up. The wizard is pretty basic. Here is the code: wizard.xml <?xml version="1.0" encoding="utf-8"?> <openerp> <data> <record id="view_res_partner_add_terminal_wizard" model="ir.ui.view"> <field name="name">res.partner.terminal.form</field> <field name="model">res.partner.terminal</field> <field name="type">form</field> <field name="arch" type="xml"> <form string="Add terminal"> <group colspan="4" > <separator string="Select terminals to assign" colspan="4"/> <field name="terminal_id" string="Terminals" domain="[('state','=','available')]"/> <newline/> </group> <separator string="" colspan="4" /> <group colspan="4" col="6"> <button icon="gtk-cancel" special="cancel" string="Cancel"/> <button icon="gtk-ok" name="add_terminal" string="Assign Terminal" type="object"/> </group> </form> </field> </record> <record id="action_res_partner_terminal" model="ir.actions.act_window"> <field name="name">Assign Terminal</field> <field name="type">ir.actions.act_window</field> <field name="res_model">res.partner.terminal</field> <field name="src_model">res.partner</field> <field name="view_type">form</field> <field name="view_mode">form</field> <field name="view_id" ref="view_res_partner_add_terminal_wizard"/> <field name="target">new</field> --> <field name="key2">client_action_multi</field> </record> <act_window id="action_res_partner_terminal_wizard" name="Assign Terminal" res_model="res.partner.terminal" src_model="res.partner" view_mode="form" key2="client_action_multi" target="new" /> </data> </openerp> And I have the code for the button with: <button name="$(universal_account.action_res_partner_terminal_wizard)d" string="Assign Terminal" type="action" /> I've tried putting the straight XML id in there (without the $()d ), and I've tried using either action defined above, all with the same results. I get an error if I put a bad action name, but that's about it. Any ideas of where to go from here?
0
[ 2, 13762, 21, 10276, 37, 21, 5167, 19, 19597, 306, 800, 3726, 3726, 31, 22, 79, 749, 20, 3394, 21, 10276, 37, 40, 1028, 227, 37, 21, 5167, 19, 19597, 306, 9, 31, 92, 3394, 14, 10276, 568, 21, 270, 11379, 5167, 114, 1123, 15, 4...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Floating sidebars approach used in Drupal Zen theme === In Drupal Zen theme, I noticed that the sidebars and the main divs are all floated to the left with each div's margin-right set back to the 0 position of the page. You can see the demo [here][1]. I know that there are many ways to achieve the same result, but I'm just curious about the advantage of using this approach. Why not just have the sidebar-second float to the right? Thanks in advance! #main { float: left; margin-left: 20%; margin-right: -80%; width: 60%; background-color: #eee; } #sidebar-first { float: left; margin-left: 0; margin-right: -20%; width: 20%; background-color: #FFFF66; } #sidebar-second { float: left; margin-left: 80%; margin-right: -100%; width: 20%; background-color: #FFFF66; } ​ [1]: http://jsfiddle.net/suke/7shnh/
0
[ 2, 8319, 270, 1850, 18, 2141, 147, 19, 15708, 6720, 10526, 3184, 800, 3726, 3726, 19, 15708, 6720, 10526, 3184, 15, 31, 2711, 30, 14, 270, 1850, 18, 17, 14, 407, 13, 12916, 18, 50, 65, 15400, 20, 14, 225, 29, 206, 13, 12916, 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...
mount.nfs: access denied by server while mounting === I am running a Linux Ubuntu VM and I want to map a network drive from a Windows server onto the VM. However, I am getting the following error: mount.nfs: access denied by server while mounting I cannot find any solution to it. I have been looking for the past 2 hours and this is driving me nuts now! I previously had a bad mount error, and fixed it by apt-get install nfs-common Then, I tried to restart nfs-common, thinking it was a service and after some google search, I found that it is actually a package. I found the files associated to it using the command: dpkg -L nfs-common | grep /etc/init.d and got this: /etc/init.d /etc/init.d/statd /etc/init.d/statd-mounting /etc/init.d/gssd /etc/init.d/idmapd Now, I don't know where to go from here.....
0
[ 2, 2149, 9, 11408, 18, 45, 1381, 5265, 34, 8128, 133, 17022, 800, 3726, 3726, 31, 589, 946, 21, 13024, 287, 12968, 2473, 13, 20147, 17, 31, 259, 20, 2942, 21, 982, 1493, 37, 21, 1936, 8128, 1204, 14, 13, 20147, 9, 207, 15, 31, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
htaccess: trouble preserving $_GET variables === I want to redirect from /gallery/X to gallery.php?category=X But when I actually goto the address, my old $_GET variable 'category' is transformed into the form: $_GET['category'] = "X.php/X" This is what my .htaccess looks like: RewriteBase / RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME}\.php -f RewriteRule ^(.*)$ $1.php RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^gallery/(.*)$ /gallery.php?category=$1 [L] I am very bad at RegEx and no almost nothing about .htaccess. I have been trying to play around with this rewrite rule to preserve the $_GET variables, but nothing I do seem to work. What am I supposed to do here? Thanks!
0
[ 2, 13, 9020, 20604, 45, 2572, 17936, 5579, 1, 3060, 12157, 800, 3726, 3726, 31, 259, 20, 302, 14706, 37, 13, 118, 14074, 3849, 118, 396, 20, 2246, 9, 26120, 60, 14375, 93, 3726, 396, 47, 76, 31, 1121, 330, 111, 14, 3218, 15, 51,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Does Request.PhysicalApplicationPath works on Shared Hosting? === Does anyone know whether Request.PhysicalApplicationPath works on shared hosting?? I need it because I'm saving user uploaded images to folder which is placed in my running web application. Hierarchy as follows ApplicationRootFolder\App_Images\Category1\myFace.jpg and I want to delete them when ever user wishes to delete. the relative path I'm storing it in the database as follows: ~/App_Images/Category1/myFace.jpg and on delete operation I first prefer to delete the file using the following code File.Delete(dt.Rows[0][i].ToString() //dt is the datatable with one row and iterating through the columns which contains image paths with max of i=5. The above one is not working. Following piece of code works. string str = Regex.Replace(dt.Rows[0][i].ToString(), "~/", ""); File.Delete(Request.PhysicalApplicationPath.ToString() + Regex.Replace(str, "/", "\\").ToString()); So Can I follow the above procedure? I am hosting on godaddy share hosting.
0
[ 2, 630, 3772, 9, 23274, 2552, 20669, 8353, 693, 27, 2592, 10637, 60, 800, 3726, 3726, 630, 1276, 143, 1472, 3772, 9, 23274, 2552, 20669, 8353, 693, 27, 2592, 10637, 60, 60, 31, 376, 32, 185, 31, 22, 79, 7599, 4155, 23782, 3502, 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...
Setting a cookie for user to stay logged in === so, I am struggling for 1 week now on this PHP code and still can't get it working. I need a cookie to be set for a user for 1 year, and also when he close his browser and visit our site again later, not to have to log in again. If someone can write the code as it should be set on my file I would be very grateful. My original code is bellow, it's from my config.php file. Many thanks in advance! function create_slrememberme() { $key = md5(uniqid(rand(), true)); global $conn; $sql="update members set remember_me_time='".date('Y-m-d H:i:s')."', remember_me_key='".$key."' WHERE username='".mysql_real_escape_string($_SESSION[USERNAME])."'"; $conn->execute($sql); setcookie('slrememberme', gzcompress(serialize(array($_SESSION[USERNAME], $key)), 9), time()+60*60*24*30); } function destroy_slrememberme($username) { if (strlen($username) > 0) { global $conn; $sql="update members set remember_me_time=NULL, remember_me_key=NULL WHERE username='".mysql_real_escape_string($username)."'"; $conn->execute($sql); } setcookie ("slrememberme", "", time() - 3600); } if (!isset($_SESSION["USERNAME"]) && isset($_COOKIE['slrememberme'])) { $sql="update members set remember_me_time=NULL and remember_me_key=NULL WHERE remember_me_time<'".date('Y-m-d H:i:s', mktime(0, 0, 0, date("m")-1, date("d"), date("Y")))."'"; $conn->execute($sql); list($username, $key) = @unserialize(gzuncompress(stripslashes($_COOKIE['slrememberme']))); if (strlen($username) > 0 && strlen($key) > 0) { $sql="SELECT status,USERID,email,username,verified from members WHERE username='".mysql_real_escape_string($username)."' and remember_me_key='".mysql_real_escape_string($key)."'"; $rs=$conn->execute($sql); if($rs->recordcount()<1) { $error = "Error: Could not locate your account."; } elseif($rs->fields['status'] == "0") { $error = "Error: Your account has been disabled by the administrator."; } if($error=="") { $_SESSION['USERID']=$rs->fields['USERID']; $_SESSION['EMAIL']=$rs->fields['email']; $_SESSION['USERNAME']=$rs->fields['username']; $_SESSION['VERIFIED']=$rs->fields['verified']; create_slrememberme(); } else { destroy_slrememberme($username); } } }
0
[ 2, 2697, 21, 19980, 26, 4155, 20, 1179, 13, 19287, 19, 800, 3726, 3726, 86, 15, 31, 589, 7587, 26, 137, 877, 130, 27, 48, 13, 26120, 1797, 17, 174, 92, 22, 38, 164, 32, 638, 9, 31, 376, 21, 19980, 20, 44, 309, 26, 21, 4155, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
should log messages be more human readable or computer readable? === I can see advantages to both. **human readable** - quickly solving a problem is easy, because you can easily find out what's going on - when you make a computer readable form, you're usally also sticking to a certain schema, this limits you when your application changes **computer readable** - easier to automatically analyze logs to improve the site.
0
[ 2, 378, 6738, 7561, 44, 91, 585, 1302, 579, 54, 1428, 1302, 579, 60, 800, 3726, 3726, 31, 92, 196, 14683, 20, 156, 9, 13, 1409, 7057, 1302, 579, 1409, 13, 8, 976, 17533, 21, 1448, 25, 2010, 15, 185, 42, 92, 2351, 477, 70, 98, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
extract text between xml comments in regex === I need to extract text from XML as follows: <code> ...some xml code... <\!-- start --> text to be extracted <\!-- end --> ...some xml code... </code> I need a regular expression to output: text to be extracted I tried something like: (?<=\<\!--\s*start\s*--\>)(.*)(?=\<\!--\s*end\s*--\>) any ides?
0
[ 2, 10962, 1854, 128, 23504, 7534, 19, 7953, 1706, 800, 3726, 3726, 31, 376, 20, 10962, 1854, 37, 23504, 28, 2415, 45, 13, 1, 9375, 1, 13, 9, 9, 9, 3220, 23504, 1797, 9, 9, 9, 13, 1, 187, 8, 8, 799, 13, 8, 8, 1, 1854, 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...
C# How do I activate another Enumerator inside the first one === I have two separate actions that are enumerators. One can be run independently, the other depends on the first to run afterwards. I though I would be really smart by doing this: public IEnumerator<IResult> DoStuffIndependently() { yield return this; yield return that; } public IEnumerator<IResult> DoStuffBeforeSometimes() { yield return AffectThis; yield return AffectThat; yield return DoStuffIndependently(); } This doesn't work, also putting it through a foreach doesn't work either. I don't want to step through everything myself and I'm guessing there is a really easy way to do this.
0
[ 2, 272, 5910, 184, 107, 31, 18163, 226, 26940, 248, 572, 14, 64, 53, 800, 3726, 3726, 31, 57, 81, 1725, 3078, 30, 50, 26940, 248, 18, 9, 53, 92, 44, 485, 9029, 15, 14, 89, 9597, 27, 14, 64, 20, 485, 4601, 9, 31, 362, 31, 8...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How to insert javascript value into the php session variable === I want to insert javascript value into the php session variable but inside the javascript function. Here is what I have tried and it is not working: function languageChange() { var lang = $('#websites1 option:selected').val(); <?php $_SESSION['SESS_LANGUAGE']?> = lang; alert(<?php echo $_SESSION['SESS_LANGUAGE']?>); }
0
[ 2, 184, 20, 14692, 8247, 8741, 1923, 77, 14, 13, 26120, 3723, 7612, 800, 3726, 3726, 31, 259, 20, 14692, 8247, 8741, 1923, 77, 14, 13, 26120, 3723, 7612, 47, 572, 14, 8247, 8741, 1990, 9, 235, 25, 98, 31, 57, 794, 17, 32, 25, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How to filter the radcombobox with unadjacent words? === If i use the `radcombobox` : as the following : <telerik:RadComboBox ID="ddl_emp1" runat="server" AutoPostBack="True" CausesValidation="false" CollapseDelay="0" Culture="ar-EG" ExpandDelay="0" Filter="Contains" ItemsPerRequest="100" MarkFirstMatch="true" Skin="Outlook" Width="200px" EnableAutomaticLoadOnDemand="True" EmptyMessage="-Type Employee Name -" ValidationGroup="2" ShowMoreResultsBox="True" OnSelectedIndexChanged="ddl_emp1_SelectedIndexChanged"> </telerik:RadComboBox> if the items in the combo box consists of multi parts ,say for example : Ran jack Rony i wanna to get this item ,if i type `Ran Rony` ,i get no result . i set the Filter property to "Contains" instead "StartWith" but it doesn't fix this issue
0
[ 2, 184, 20, 11945, 14, 4944, 960, 1192, 5309, 29, 367, 1283, 1004, 5089, 715, 60, 800, 3726, 3726, 100, 31, 275, 14, 13, 1, 8278, 960, 1192, 5309, 1, 13, 45, 28, 14, 249, 13, 45, 13, 1, 14305, 6639, 45, 8278, 960, 1192, 5309, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How to access a database on a server in android? === I am new to android, and I'm developing an application that retrieves information from a database on a server and fills in fields in the android application. The thing is that I still haven't figured out what to use (SOAP or REST) and how to implement the classes and open a connection. Any one can help me out ?
0
[ 2, 184, 20, 1381, 21, 6018, 27, 21, 8128, 19, 13005, 60, 800, 3726, 3726, 31, 589, 78, 20, 13005, 15, 17, 31, 22, 79, 3561, 40, 3010, 30, 11917, 18, 676, 37, 21, 6018, 27, 21, 8128, 17, 3509, 18, 19, 2861, 19, 14, 13005, 301...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 pass static constant as parameter in Spring config? === This is my class: public class MyClassA { private int mode; public static int THREAD_MODE=1; public static int CLUSTER_MODE=2; public MyClassA(int mode) { this.mode= mode; } } and I want to send this information in my spring configuration xml to my class instance. How do I achieve something like this? <bean id="myclass" class="com.test.MyClassA"> <constructor-arg value="MyClassA.THREAD_MODE"/> </bean>
0
[ 2, 184, 20, 1477, 12038, 3587, 28, 18906, 19, 1573, 13, 14093, 2816, 60, 800, 3726, 3726, 48, 25, 51, 718, 45, 317, 718, 51, 1898, 58, 13, 1, 932, 19, 38, 3740, 73, 317, 12038, 19, 38, 9322, 1, 15570, 3726, 165, 73, 317, 12038...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
JavaScipt - Uncaught TypeError: Type error === I am trying to break a spritesheet and well, it's not putting it into a 2D array like it should. At the end of my code, near the console.log, it spits out ImageData...but when it tries to putImageData... I get `Uncaught TypeError: Type error ` Help? and here's my code: $(document).ready(function () { console.log("Client setup..."); canvas = document.getElementById("canvas"); context = canvas.getContext("2d"); canvas.tabIndex = 0; canvas.focus(); console.log("Client focused."); var imageObj = new Image(); imageObj.src = "./images/all_tiles.png"; imageObj.onload = function() { context.drawImage(imageObj, imageWidth, imageHeight); }; var allLoaded = 0; var tilesX = ImageWidth / tileWidth; var tilesY = ImageHeight / tileHeight; var totalTiles = tilesX * tilesY; var tileData = [totalTiles]; // Array with reserved size for(var i=0; i<tilesY; i++) { for(var j=0; j<tilesX; j++) { // Store the image data of each tile in the array. tileData.push(context.getImageData(j*tileWidth, i*tileHeight, tileWidth, tileHeight)); allLoaded++; } } if (allLoaded == totalTiles) { console.log("All done: " + allLoaded); console.log(tileData[1]); context.putImageData(tileData[0], 0 ,0); // Sample paint } }); error happens at `context.putImageData(tileData[0], 0 ,0); // Sample paint`
0
[ 2, 8247, 18, 11526, 38, 13, 8, 16061, 12647, 1001, 29992, 45, 1001, 7019, 800, 3726, 3726, 31, 589, 749, 20, 1442, 21, 27902, 17627, 17, 134, 15, 32, 22, 18, 52, 3873, 32, 77, 21, 172, 43, 7718, 101, 32, 378, 9, 35, 14, 241, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Developer/Tools/sdp: No such file or directory === I am working to make my application apple scriptable,for which i use the developer material in the link below https://developer.apple.com/cocoa/applescriptforapps.html That tutorial take CircleView Application for example, and make it into an apple Scriptable application through some procedural steps. After a new run script has been added in CircleView Application as said in the tutorial , i got error like Developer/Tools/sdp: No such file or directory I don't know how to solve
0
[ 2, 10058, 118, 20799, 18, 118, 18, 7431, 45, 90, 145, 3893, 54, 16755, 800, 3726, 3726, 31, 589, 638, 20, 233, 51, 3010, 4037, 3884, 579, 15, 1106, 56, 31, 275, 14, 10058, 1492, 19, 14, 3508, 1021, 7775, 18, 6903, 26051, 106, 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...
Adding, removing objects from a ForeignCollection === I have an entity that contains a ForeignCollection with a getter & setter for the Collection public class TextQuestion{ @ForeignCollectionField private ForeignCollection<TextAnswer> answers; .... I have a Servicer wrapper class that encapsulates a DAO public class TextQuestionService { private static TextQuestionService instance; private static Dao<TextQuestion, Integer> textQuestionDAO; private static DatabaseHelper dbHelper = new DatabaseHelper(); public void addAnswer( TextQuestion textQuestion, TextAnswer answer ) { List<Answer> answers = (List)textQuestion.getAnswers(); if( answers == null ) { try { answers = (List)textQuestionDAO.getEmptyForeignCollection("answers"); } catch (SQLException e) { // TODO Auto-generated catch block e.printStackTrace(); } } answers.add(answer); } My Question is How do I add, remove items from this collection via the Wrapper service class? Above is my effort but I have just got completely lost, casting Collections to Lists etc. The problem is when I want to add an Answer to the Questions ForeignCollection there would be no problem if the Answers Collection was not null but I want to build the Question up, add Answers to it before persisting it. From a previous question I understand I need to call the getEmptyForeignCollection if the parent has not been retrieved from the DB. There must be a simple way to do this? Any worked similar example would be nice
0
[ 2, 4721, 15, 9096, 3916, 37, 21, 1228, 15015, 872, 800, 3726, 3726, 31, 57, 40, 9252, 30, 1588, 21, 1228, 15015, 872, 29, 21, 164, 815, 279, 309, 815, 26, 14, 1206, 317, 718, 1854, 24652, 1, 13, 1, 28292, 15015, 872, 1109, 932, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
FB.Canvas.setSize() -- no parameter / auto-resize not working === We called the setSize with no parameter and it is not working. FB.Canvas.setSize(); at Jul 18, don't work at Jul 17, work I have searched on the internet that many people have this problem. But most fixes are related to the call with parameters, i.e. FB.Canvas.setSize({width height});
0
[ 2, 13, 13478, 9, 1245, 8471, 9, 3554, 10454, 5, 6, 13, 8, 8, 90, 18906, 13, 118, 3108, 8, 99, 10454, 52, 638, 800, 3726, 3726, 95, 227, 14, 309, 10454, 29, 90, 18906, 17, 32, 25, 52, 638, 9, 13, 13478, 9, 1245, 8471, 9, 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...
Facebook events arent triggered === I read the api and followed their instructions.. to create a button with events: This works below: FB.init({ appId : 'Dmitri Mako', // App ID channelUrl : 'http://localhost/Dummy/FBplugin/fb.php', // Channel File status : true, // check login status cookie : true, // enable cookies to allow the server to access the session xfbml : true // parse XFBML }); However none of the events below are being triggered. That is apart form fbAsyncInit, which is triggered when an sdk is loaded. window.fbAsyncInit = function() { console.log('Sdk is loaded'); FB.getLoginStatus(function(response) { console.log('GEtting logged in status'); if (response.status === 'connected') { // the user is logged in and has authenticated your // app, and response.authResponse supplies // the user's ID, a valid access token, a signed // request, and the time the access token // and signed request each expire var uid = response.authResponse.userID; console.log('User is connected'); var accessToken = response.authResponse.accessToken; } else if (response.status === 'not_authorized') { // the user is logged in to Facebook, // but has not authenticated your app console.log('User not authorized'); } else { // the user isn't logged in to Facebook. console.log('User inst logged in'); } }); }; console.log('FB.getLoginStatus: '+FB.getLoginStatus); FB.Event.subscribe('edge.create', function(response) { console.log('You liked the URL: ' + response.status); }); I want to trigger edge.create, which is an event that is triggered whenever you like a site!.. The other event that I am using is "getLoginStatus", which will show me if the user is logged in to facebook or not.. But why none of those two events work? Also note that I put the fb:like button dynamically on the page
0
[ 2, 9090, 963, 14144, 15164, 800, 3726, 3726, 31, 1302, 14, 21, 2159, 17, 709, 66, 7650, 9, 9, 20, 1600, 21, 5167, 29, 963, 45, 48, 693, 1021, 45, 13, 13478, 9, 108, 242, 5, 1, 4865, 1340, 13, 45, 13, 22, 43, 1435, 3367, 1216...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
QListView drop indicator styling === I am using `QListView` to show a list of items that I can drag and drop to change their order. The problem is that: - the drop indicator is just a very small line (1px thickness) - the drop area is so narrow so one needs to be really accurate to drop an item correctly between two other items. I wonder if it is possible to change the styling of the drop indicator of `QListView` so the line is thicker and the drop area is wider.
0
[ 2, 2593, 5739, 4725, 2804, 13310, 23020, 800, 3726, 3726, 31, 589, 568, 13, 1, 1251, 5739, 4725, 1, 20, 298, 21, 968, 16, 3755, 30, 31, 92, 5501, 17, 2804, 20, 753, 66, 389, 9, 14, 1448, 25, 30, 45, 13, 8, 14, 2804, 13310, 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...
Saving video to custom album in iphone === I am trying to write my own camera app for iphone. I am able to save photo and video to camera roll successfully. Now, i am trying out to save photo and video to custom album. I am able to save photo to custom album with some help from browsing. Also, i tried finding out if it is possible do the same with video. But, i was not able to do it and couldn't find the solution. Can someone help me with this? Similar question which is un-answered: http://stackoverflow.com/questions/10721988/save-video-to-custom-album-in-camera-roll Regards.
0
[ 2, 7599, 763, 20, 5816, 244, 19, 21024, 800, 3726, 3726, 31, 589, 749, 20, 2757, 51, 258, 3336, 4865, 26, 21024, 9, 31, 589, 777, 20, 2079, 3056, 17, 763, 20, 3336, 3001, 3673, 9, 130, 15, 31, 589, 749, 70, 20, 2079, 3056, 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...
getCurrentSession gives No Session Bound to Context, openSession does not === I'm trying to integrate Spring 3.1 with Hibernate 4.1.4, but I am having problems when getting my session from a generic DAO. The problem is, if I use getCurrentSession() I get a NullPointerException and Hibernate says No session is bound to the context, yet if I use openSession everything seems to be working. Somehow I feel I should uye getCurrentSession, but can't find the origin of the problem. I've searched this over the internet but none of the solutions worked for me. Here's my genericDAO code: public class GenericDaoHibernateImpl<E, PK extends Serializable> implements GenericDao<E, PK> { private Class<E> entityClass; protected GenericDataBaseExceptionHandler exceptionHandler; private SessionFactory sessionFactory; @SuppressWarnings("unchecked") public GenericDaoHibernateImpl() { this.entityClass = (Class<E>) ((ParameterizedType) getClass(). getGenericSuperclass()).getActualTypeArguments()[0]; } public void setExceptionHandler(GenericDataBaseExceptionHandler exceptionHandler) { this.exceptionHandler = exceptionHandler; } public void setSessionFactory(SessionFactory sessionFactory) { this.sessionFactory = sessionFactory; } protected Session getSession() { if (sessionFactory.getCurrentSession() == null) throw new IllegalStateException("Session has not been set on DAO before usage"); return sessionFactory.getCurrentSession(); //This crashes // return sessionFactory.openSession(); //This does not } public Class<E> getEntityClass() { return entityClass; } public void persist(E entity) throws GenericDataBaseException { try { getSession().persist(entity); } catch (Throwable t) { Collection<Object> args = new ArrayList<Object>(); args.add(entity); throw exceptionHandler.handle(t, "persist", args); } } (...) } And my spring config file: <context:annotation-config /> <bean id="dataSource" class="com.mchange.v2.c3p0.ComboPooledDataSource" destroy-method="close"> <property name="driverClass"> <value>com.mysql.jdbc.Driver</value> </property> <property name="jdbcUrl"> <value>jdbc:mysql://localhost/forestool</value> </property> <property name="user"> <value>forestool</value> </property> <property name="password"> <value>forestool</value> </property> </bean> <!-- Declaración de la factoría de sesiones hibernate con los mappings necesarios --> <bean id="sessionFactory" class="org.springframework.orm.hibernate4.LocalSessionFactoryBean"> <property name="dataSource"> <ref bean="dataSource"/> </property> <property name="mappingLocations"> <list> <value>classpath*:/hbm/*.hbm.xml</value> </list> </property> <property name="hibernateProperties"> <ref bean="hibernateProperties"/> </property> </bean> <bean id="transactionManager" class="org.springframework.orm.hibernate4.HibernateTransactionManager"> <property name="sessionFactory"> <ref bean="sessionFactory"/> </property> </bean> <bean id="hibernateProperties" class="java.util.Properties"> <constructor-arg index="0"> <props> <prop key="hibernate.dialect">org.hibernate.dialect.MySQLInnoDBDialect</prop> </props> </constructor-arg> </bean>
0
[ 2, 164, 17657, 7202, 5991, 2352, 90, 3723, 4138, 20, 4141, 15, 8965, 160, 5991, 630, 52, 800, 3726, 3726, 31, 22, 79, 749, 20, 18399, 1573, 203, 9, 165, 29, 4148, 2102, 8820, 268, 9, 165, 9, 300, 15, 47, 31, 589, 452, 1716, 76...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
iOS - custom image for UISlider === I want to use an image for the UISlider track. I don't want one color on the left of the thumb, and another color on the right. I just want one static image across the whole track. Possible?
0
[ 2, 13, 7760, 13, 8, 5816, 1961, 26, 287, 403, 1210, 1157, 800, 3726, 3726, 31, 259, 20, 275, 40, 1961, 26, 14, 287, 403, 1210, 1157, 792, 9, 31, 221, 22, 38, 259, 53, 1665, 27, 14, 225, 16, 14, 5078, 15, 17, 226, 1665, 27, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Get nodes from xml files === How to parse the xml file? <?xml version="1.0" encoding="UTF-8"?> <sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"> <sitemap> <loc>link</loc> <lastmod>2011-08-17T08:23:17+00:00</lastmod> </sitemap> <sitemap> <loc>link</loc> <lastmod>2011-08-18T08:23:17+00:00</lastmod> </sitemap> <sitemap> </sitemapindex> I am new to XML, I tried this, but it seems to be not working : XmlDocument xml = new XmlDocument(); //* create an xml document object. xml.Load("sitemap.xml"); XmlNodeList xnList = xml.SelectNodes("/sitemapindex/sitemap"); foreach (XmlNode xn in xnList) { String NAME= xn["name"].InnerText; String URL = xn["url"].InnerText; }
0
[ 2, 164, 16272, 37, 23504, 6488, 800, 3726, 3726, 184, 20, 2017, 870, 14, 23504, 3893, 60, 13, 1, 60, 396, 8184, 615, 3726, 7, 165, 9, 387, 7, 19608, 3726, 7, 1982, 410, 8, 457, 7, 60, 1, 13, 1, 9097, 15022, 25671, 23504, 2172,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Adding Syntax Highlighting in UIWebView === My first jump into iOS programming and I am looking to expand on the notepad tutorials to add syntax highlighting. The end result is to have something similar to [this javascript project][1]. As you end each word the plan being to format it if it falls into a predefined list, line numbers etc. A previous SO question on [rich text editors][2] had led me to a tutorial but it appeared to more centered on calling javascript to add certain style. This would lead me to think that the best I can do is code a syntax highlighter in javascript and have an event handler on the text box - catch all letters and match the word on each space. [1]: http://alexgorbatchev.com/SyntaxHighlighter/manual/demo/ [2]: http://stackoverflow.com/questions/8671174/design-rich-text-area-in-iphone
0
[ 2, 4721, 22649, 23102, 19, 13, 5661, 14113, 4725, 800, 3726, 3726, 51, 64, 3936, 77, 13, 7760, 3143, 17, 31, 589, 699, 20, 6073, 27, 14, 1945, 8240, 29724, 18, 20, 3547, 22649, 23102, 9, 14, 241, 829, 25, 20, 57, 301, 835, 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...
Can I run git locally on my box and still play nicely with the company SVN repo? === My company uses SVN for versioning. I find that I have to work on several bugs at once, which requires multiple (sometimes conflicting) changes to the same files to create an environment in which I can develop and fix. Essentially, I just want to be able to instance my workflow. To make my work easier, I'd like to manage instances with git on my local machine, all the while using SVN to keep my local in sync with the company latest stable. I have theorized I can do this if I create a local Main trunk, and a local "Nightly" trunk (essentially latest updated). I keep the nightly up-to-date with the latest build, the Main would act as a sort of "push point" where I can commit my changes to the company trunk. Whenever I want to create a project, I branch off the nightly, make changes, merge into the nightly, and then merge that back into my main, and commit to the SVN. Looks something like: Main ----------------------------------------------------------------------- \ / Nightly ------------------------------------------------------------------- \ / Project ---------------- And if it's not apparent, the point of the nightly would be to allow the updates I get to make their way into my projects without contaminating the Main trunk. Would this work? Is there maybe (probably) a better solution? I'd love some feedback.
0
[ 2, 92, 31, 485, 13, 10404, 6680, 27, 51, 1649, 17, 174, 418, 24050, 29, 14, 237, 13, 18, 16578, 302, 1638, 60, 800, 3726, 3726, 51, 237, 2027, 13, 18, 16578, 26, 615, 68, 9, 31, 477, 30, 31, 57, 20, 170, 27, 238, 13925, 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...
declaring a class with a nondefault constructor inside another class === How can I achieve this behavior? class A { int x; public: A(int x) : x(x) {} }; class B { A a; // here is the problem public: B() : a(1) {} // solution i found }; int main(void) { B b; return 0; } I'm wondering if there is another way of making this work except the answer I found.
0
[ 2, 15594, 21, 718, 29, 21, 538, 13862, 9708, 6960, 248, 572, 226, 718, 800, 3726, 3726, 184, 92, 31, 4689, 48, 3257, 60, 718, 21, 13, 1, 19, 38, 993, 73, 317, 45, 21, 5, 6391, 993, 6, 13, 45, 993, 5, 396, 6, 13, 1, 13, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Removing items from a collection using WCF Data Services === I have a checked listbox in a Windows Forms app that allows the user to assign one or more security groups to a selected user. Using WCF Data Services, I am able to populate the box without a problem. However, as the user changes selections in the box and tries to save those changes, I run into issues. Here is the code, with comments to explain my logic. private void ProcessSecurityGroupSelection_Original() { //Get a reference to the selected user, including the associated SecurityGroups. var user = _ctx.Users .AddQueryOption("$filter", "UserID eq " + ((DataService.User)lstUsers.SelectedItem).UserID) .AddQueryOption("$expand", "SecurityGroups") .First(); //Remove all the SecurityGroups so we can replace them. user.SecurityGroups.Clear(); foreach (var selectedGroup in lstSecurityGroups.CheckedItems) { //Loop through the selected SecurityGroups, linking and adding each SecurityGroup to the User object. var securityGroup = (from sg in _ctx.SecurityGroups where sg.SecurityGroupID == ((DataService.SecurityGroup)selectedGroup).SecurityGroupID select sg).First(); _ctx.AddLink(user, "SecurityGroups", securityGroup); user.SecurityGroups.Add(securityGroup); } _ctx.UpdateObject(user); _ctx.SaveChanges(); } When the code hits the AddLink method for a SecurityGroup that had previously been selected, I get an error stating "The context is already tracking the relationship." It doesn't appear that the Clear() method removes any links in the context. How do I go about removing the existing links, or am I approaching this all wrong?
0
[ 2, 9096, 3755, 37, 21, 1206, 568, 11801, 410, 1054, 687, 800, 3726, 3726, 31, 57, 21, 6505, 968, 5309, 19, 21, 1936, 1997, 4865, 30, 2965, 14, 4155, 20, 13952, 53, 54, 91, 1221, 1170, 20, 21, 1704, 4155, 9, 568, 11801, 410, 1054...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 customized "from address" in Grails Email service === I have question regarding Email service "from" address. I want to show a name say XYZ instead of XYZ@abc.com. I tried to have it have a string "XYZ" in from but i was getting a mailsend exception. mailService.sendMail{ from "XYZ" to "abc@123.com" subject "HI" body "How ru?" } **The Exception is**:org.springframework.mail.MailSendException: Failed messages: com.sun.mail.smtp.SMTPSendFailedException: 553 5.5.4 <XYZ>... Domain name required for sender address XYZ. Is there any way to have a alias name instead of from address in the from coloumn of the mail? Thanks.
0
[ 2, 184, 20, 164, 28779, 13, 7, 2665, 3218, 7, 19, 489, 7301, 18, 8517, 365, 800, 3726, 3726, 31, 57, 1301, 3467, 8517, 365, 13, 7, 2665, 7, 3218, 9, 31, 259, 20, 298, 21, 204, 395, 13, 15161, 380, 700, 16, 13, 15161, 380, 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...
What is the best way to binary search an array via another array? === What would be the best way to do a binary search in an array that you can actually access it *via indirection*? Meaning I have an `Integer[]` that stores the indexes of a `String[]` that represent the sorted version of the `String[]` E.g. `Integer[] idxes= {5, 4, 0, 3 , 1, 2}` which means that the `String[5]` or `String[idxes[0]]` is the lowest string lexicographically. I hope the description is clear. What would be the best way to do a binary search via the `idexes` for a `String` if it is part of the `String[] words` ? What I did is the following: int pos = Arrays.binarySearch(idexes, -1, new Comparator<Integer>(){ @Override public int compare(Integer o1, Integer o2) { if(o1 == -1){ return k.compareTo(words[o2]); } else{ return words[o1].compareTo(k); } } }); where `k` is the search word and `words[]` is the `String[]` I mentioned earlier. This works, but I don't like the `-1` I pass in the `binarySearch` api. Is there a better way to approach this?
0
[ 2, 98, 25, 14, 246, 161, 20, 14171, 2122, 40, 7718, 1197, 226, 7718, 60, 800, 3726, 3726, 98, 83, 44, 14, 246, 161, 20, 107, 21, 14171, 2122, 19, 40, 7718, 30, 42, 92, 1121, 1381, 32, 1637, 5034, 17132, 872, 2483, 60, 1813, 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...
display all the resolved issues since the previous build === I have two build configurations- a dev configuration (builds on every checkin), and a QA configuration (builds on-demand, whenever a version for qa is released. We don't do continuous deployment (yet)). When a version for QA is released, I'd like to be able to know what issues have been resolved since the last version. (format is not important- report / chart / text...), Meaning- i'd like to know all the issues that have been changed to 'resolved' since the date of the last build in this configuration. I'm using [tfs teamcity issue tracker][1]. Any ideas? [1]: http://tfsteamcity.codeplex.com/
0
[ 2, 3042, 65, 14, 11052, 1549, 179, 14, 1158, 1895, 800, 3726, 3726, 31, 57, 81, 1895, 8091, 18, 8, 21, 9664, 8091, 13, 5, 29361, 18, 27, 352, 2631, 108, 6, 15, 17, 21, 7234, 8091, 13, 5, 29361, 18, 27, 8, 25358, 15, 6634, 21...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How to connect to SqlAzure with Ssmse Error 208 === i have a database on SqlAzure and i can use it in my project as well. But i want to control database in ssmse . i have this 208 error. i have connection string and username and a password to sign in but they aren't work. http://c1207.hizliresim.com/z/2/9554j.jpg -- The Error!
0
[ 2, 184, 20, 6379, 20, 4444, 17575, 4221, 29, 13, 18, 18, 79, 870, 7019, 13, 19793, 800, 3726, 3726, 31, 57, 21, 6018, 27, 4444, 17575, 4221, 17, 31, 92, 275, 32, 19, 51, 669, 28, 134, 9, 47, 31, 259, 20, 569, 6018, 19, 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...
vba excel - copy searched cells into separate workbook === Suppose I have the following data, with all rows and columns varying each time I access it. dog 8 black dog 7 blue dog 4 grey cat 8 red cat 4 yellow cat 6 yellow cat 4 red bird 7 green bird 5 black bird 7 black rabbit 3 red rabbit 7 red rabbit 4 grey rabbit 10 green rabbit 6 yellow If I wanted to search for "cat", then copy all data of all cat rows to another workbook, how would I code this in an Excel macro? So in this case, the code would search down column A1 for "cat" (found in A4), go to the last "cat" (A7), and copy/paste all cells related to all cats (i.e. copy/paste A4:C7 to another workbook). cat 8 red cat 4 yellow cat 6 yellow cat 4 red I hate to be picky too, but I don't want to copy the entire rows, just the cells that have data. The reason is because when I recorded a macro once by copying/pasting rows to another workbook, the recorded workbook became very large in size (something about excel thinking the blank cells were also copied resulting in an unnecessarily large file). thanks in advance!
0
[ 2, 566, 969, 20700, 13, 8, 4344, 9036, 2934, 77, 1725, 170, 5199, 800, 3726, 3726, 5787, 31, 57, 14, 249, 1054, 15, 29, 65, 11295, 17, 7498, 9852, 206, 85, 31, 1381, 32, 9, 1952, 469, 319, 1952, 453, 705, 1952, 268, 2682, 2008, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 Facebook inserting a preload script for my app's css in HTTP when my page's reference is in HTTPS? === In our app (https://apps.facebook.com/testedenivel), we explicitly reference the page css in a https link like this: <link rel="stylesheet" href="https://d2asm4nez8zghw.cloudfront.net/content/app-teste-de-nivel.css?v=0.96.02" type="text/css" media="screen"> But strangely, Facebook is preloading this this css file as a HTTP link. At some point before, we used this HTTP url but later we changed it to HTTPS, and now it seems that Facebook is using a former, cached version of that url: <script type="text/javascript"> new Image().src = "http:\/\/www.talkfast.com.br\/content\/app-teste-de-nivel.css"; </script> The problem is that when the user enters our app via secure browsing, the HTTP link preloading is causing the browser to alert our users that some insecure content is about to be loaded. We'd like to know how to tell Facebook to remove this preloading script, or at least to use our current HTTPS url, like this: <script type="text/javascript"> new Image().src = "https://d2asm4nez8zghw.cloudfront.net/content/app-teste-de-nivel.css?v=0.96.02"; </script> There seems to be scarcity of reference regarding this issue on the web, so any help would be appreciated.
0
[ 2, 483, 25, 9090, 14692, 68, 21, 782, 8294, 3884, 26, 51, 4865, 22, 18, 272, 18, 18, 19, 7775, 76, 51, 2478, 22, 18, 2801, 25, 19, 7775, 18, 60, 800, 3726, 3726, 19, 318, 4865, 13, 5, 21127, 18, 6903, 7753, 18, 9, 6413, 5199...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Writing small FTP application fingerprinter === I recently downloaded p0f, the famous OS and HTTP fingerprinting tool, and had some fun using python's scapy library to construct packets that emulate different OSs and sending them across a local network to be picked up and ID'd by p0f. Now, I want to take this to the next level by writing a script that performs much like p0f, but with FTP-fingerprinting instead of HTTP. So far, I've accomplished the ability to differentiate FTP packets from the rest of the network flow via a simple comparison of the first 24/32 bits of the FTP payload (32 bits for client commands, 24 bits for server response codes). However, whereas pattern-matching works for packets with HTTP payloads, I've discovered using Wireshark that there are typically no discernable differences between different FTP clients in regards to individual packet construction, most importantly in the application-layer data. The only true difference I can discern is the order in which different clients send their FTP commands (PWD, USER, SYST, RETR, etc) when performing an action like logging in, put/get, etc. This leads me to believe that I won't be able to create a dynamic fingerprinter like the HTTP model in p0f, but instead will have to store the trail of interaction between a client and server (individually of course), and then perhaps combine and hash the commands into a unique signature for lookup. There are a ton of issues associated with this approach, the biggest of which is relying on a user to generate the right sequence of commands for something as simple as logging onto the remote server (connect / enter username correctly / enter password correctly); there is just an enormous amount of variation in what the user can do, which would create a near infinite number of signatures. Any ideas on where to go from here? Is this even possible? Here is sample output from what I currently have, the results displayed are me logging into a server using two different FTP clients on two different virtual machines (meaning they have different IPs). http://i.imgur.com/p15SU.png
0
[ 2, 1174, 284, 1187, 306, 3010, 21564, 106, 800, 3726, 3726, 31, 1989, 23887, 351, 387, 410, 15, 14, 1561, 13, 759, 17, 7775, 21564, 68, 5607, 15, 17, 41, 109, 2414, 568, 20059, 22, 18, 11583, 6448, 1248, 20, 6960, 12795, 18, 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...
Halting progress of an HTML POST with a PopUp box if the fields are not filled out === I'm creating a webpage which has several fields. I do not want the php code to execute unless all the fields are filled out as that will create an error. Here is my html code: <html> <body bgcolor="AliceBlue"> <center> <img src="logo.jpg" alt="Logo" /> <h1>IPViking<sup>TM</sup> Analysis</h1></center> <form action="WorkingVersionV2.php" method="post"> <p>Which database do you wish to access? <center> <input type="text" name="database"/> </center></p> <p>What table would you like to examine? <center><input type="text" name="oldtablename"/></center></p> <p>What would you like to name the table produced? <center><input type="text" name="newtablename"/></center></p> <p>Start at row: <center><input type="text" name="startrow"/></center></p> <p>Number of rows to search through:<center> <input type="text" name="numberrows"/> </center></p> <center><input type = "submit" onclick="checkFields()"/></center> </form> <script type="text/javascript"> function checkFields() { var x = document.getElementById("database").innerHTML; if(x=="") { alert("You forgot to enter a database name"); } } </script> </body> </html> I figured throwing a pop up box would halt the user if the fields were not filled out. However, when the user clicks submit, the pop up box is not thrown up, and I'm unsure whether the php code will still execute once they close it. HTML/javascript is not my forte, if you have a better or easier way of doing this then please let me know.
0
[ 2, 7278, 68, 3455, 16, 40, 13, 15895, 678, 29, 21, 1675, 576, 1649, 100, 14, 2861, 50, 52, 1943, 70, 800, 3726, 3726, 31, 22, 79, 2936, 21, 2741, 6486, 56, 63, 238, 2861, 9, 31, 107, 52, 259, 14, 13, 26120, 1797, 20, 15644, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Expand text outside of container === I am trying to figure out how to expand my text outside of its container. The desired effect is to have a the text expand larger than its container. Ex.// ![text expanding outside of its container][1] [1]: http://i.stack.imgur.com/plbGQ.jpg I'm not sure how to start with this. I'm new to HTML and CSS and could use some help :)
0
[ 2, 6073, 1854, 719, 16, 12147, 800, 3726, 3726, 31, 589, 749, 20, 1465, 70, 184, 20, 6073, 51, 1854, 719, 16, 82, 12147, 9, 14, 9264, 1590, 25, 20, 57, 21, 14, 1854, 6073, 1662, 119, 82, 12147, 9, 1396, 9, 118, 118, 13, 187, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Facebook sso integration is not working? === What may the causes tof FBSSO signin not working.Am restoring accesstoken and expires,Authorising when it fails.I didnt get any error in my logcat.Just showing dialog loading then back to again signin screen.getting warning as getextracted inactive input connection. public void onActivityResult(int requestCode, int resultCode, Intent data) { super.onActivityResult(requestCode,resultCode,data);Utility.mFacebook.authorizeCallback(requestCode, resultCode, data);}
0
[ 2, 9090, 13, 18, 656, 8078, 25, 52, 638, 60, 800, 3726, 3726, 98, 123, 14, 4047, 20, 410, 13, 13478, 18, 656, 1676, 108, 52, 638, 9, 765, 19144, 1381, 262, 2853, 17, 25910, 18, 15, 10007, 7552, 76, 32, 13614, 9, 49, 1182, 164,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
DoVoid Leaving Transaction in 'Pending' Status === Using the PayPal Express Checkout API's to create an order, authorise it, and then when the goods are shipped we are able to call DoCapture, however if we don't have the item in stock we call 'DoVoid'. Every API call (include the DoVoid) returns success from PayPal, however we've been informed by customers that the Payment Status remains 'pending' in the PayPal overview screen. If a user clicks 'details' in the overview screen they can see two transactions (one which returns the funds), however the actual 'order' isn't updated. Does anyone know: 1. Is there an additional API call that needs to be made? 2. The best mechanism for getting assistance from PayPal?
0
[ 2, 13, 19123, 6516, 1107, 12799, 19, 13, 22, 306, 7601, 22, 1782, 800, 3726, 3726, 568, 14, 1372, 6720, 2999, 2631, 1320, 21, 2159, 22, 18, 20, 1600, 40, 389, 15, 1314, 2628, 32, 15, 17, 94, 76, 14, 5018, 50, 12991, 95, 50, 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...
For How to make an XML Request in Perl -help required? === Being new to Perl and XML..Can any one guide me in order to do the following: I have to write a Perl Code which should do : 1. Make a connection. 2. Get the reponse of the connection which is connectionId and store that if in a variable. 3. Close connection Input : XML Request should be posted.The request type is http. The Syntax of XML I am having along with me. Can any one guide me what steps I should follow to meet above requirement. Thanks in advance
4
[ 2, 26, 184, 20, 233, 40, 23504, 3772, 19, 416, 255, 13, 8, 14593, 1390, 60, 800, 3726, 3726, 142, 78, 20, 416, 255, 17, 23504, 9, 9, 1245, 186, 53, 3378, 55, 19, 389, 20, 107, 14, 249, 45, 31, 57, 20, 2757, 21, 416, 255, 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...
wordpress XMLRC metaWebBlog custom field issue === I want to post articles to my blog from a C# desktop application. For this i am using XMLRC. The code without the custom fields is working fine. I will be thankful if you can help me solving the following: 1- Why the code that i wrote for custom fields in not working ? I want to set the All In One SEO pack plugin fields. 2- How can i attach Featured Image ? Following is my code: public interface IgetCatList { [CookComputing.XmlRpc.XmlRpcMethod("metaWeblog.newPost")] string NewPage(int blogId, string strUserName, string strPassword, blogInfo content, int publish); [XmlRpcMethod("metaWeblog.newMediaObject", Description = "Add a media object to a post using the metaWeblog API. Returns media url as a string.")] MediaObjectUrl newMediaObject(int blogid,string username,string password,MediaObject mediaObject); } public struct customField { public string key; public string value; } public struct blogInfo { public string title; public string description; public string post_type; public string[] categories; public string mt_keywords; public string mt_excerpt; public customField[] custom_fields; } private void PostToBlogUsingXMLRC(string pTitle,string pPost) { blogInfo newBlogPost = default(blogInfo); newBlogPost.title = pTitle; newBlogPost.description = pPost; newBlogPost.categories = new string[] { "TechReviews" }; newBlogPost.post_type = "post"; newBlogPost.mt_excerpt = "this is excerpt"; newBlogPost.mt_keywords = "keywrod"; //aiosp //aioseop customField aioseoTitle = default(customField); aioseoTitle.key = "_aioseop_title"; aioseoTitle.value = "This is SEO Title"; customField aioseoDesc = default(customField); aioseoDesc.key = "_aioseop_description"; aioseoDesc.value = "This is SEO description"; customField aioseoKeyword = default(customField); aioseoKeyword.key = "_aioseop_keywords"; aioseoKeyword.value = "This is SEO keywords"; //customField thumbnailImage = default(customField); //thumbnailImage.key = "_thumbnail_id"; //thumbnailImage.value= PostNewMediaObject(); newBlogPost.custom_fields = new customField[] { aioseoTitle, aioseoDesc, aioseoKeyword }; categories = (IgetCatList)XmlRpcProxyGen.Create(typeof(IgetCatList)); clientProtocol = (XmlRpcClientProtocol)categories; clientProtocol.Url = "http://abc.com/xmlrpc.php"; string result = null; result = ""; try { result = categories.NewPage(1, "ID", "Pass", newBlogPost, 1); MessageBox.Show("Posted to Blog successfullly! Post ID : " + result); pTitle = ""; pPost = ""; } catch (Exception ex) { MessageBox.Show(ex.Message); } }
0
[ 2, 833, 5890, 23504, 5453, 7618, 458, 3490, 5567, 5816, 575, 1513, 800, 3726, 3726, 31, 259, 20, 678, 3376, 20, 51, 8146, 37, 21, 272, 5910, 17404, 3010, 9, 26, 48, 31, 589, 568, 23504, 5453, 9, 14, 1797, 366, 14, 5816, 2861, 25...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
i have the anti-cheat program SSDT hook addresses, but how do i restore them? === i have all the SSDT hook addresses from the anti-cheat program at a game (from kernel detective). but my code doesn't seem able to change the address hex contents. please help. thanks. Address to be hooked: Address : 0x805D2C44 Location : ntkrnlpa.exe [PAGE] Len : 5 State : Relative Call :: call 0x8931C5B0 Current Value : E8 67 99 D4 08 Original Value : E8 95 88 FE FF Destination Module : 0x8931C5B0 :: - Code: #define NTKRNLPA01 0x805D2C44 ... MemRelace((void *)(NTKRNLPA01), (void *)"\xE8\x95\x88\xFE\xFF", 5) MemReplace function: bool MemReplace(VOID *lpMem, VOID *lpSrc, DWORD len) { DWORD lpflOldProtect, flNewProtect = PAGE_READWRITE; unsigned char *pDst = (unsigned char *)lpMem, *pSrc = (unsigned char *)lpSrc; if (VirtualProtect(lpMem,len,flNewProtect,&lpflOldProtect)) { while(len-- >0) *pDst++ = *pSrc++; VirtualProtect(lpMem,len, lpflOldProtect,&lpflOldProtect); FlushInstructionCache(GetCurrentProcess(), lpMem, len); return 1; } return 0; }
0
[ 2, 31, 57, 14, 1082, 8, 2569, 721, 625, 13, 18, 18, 43, 38, 5559, 12636, 15, 47, 184, 107, 31, 8454, 105, 60, 800, 3726, 3726, 31, 57, 65, 14, 13, 18, 18, 43, 38, 5559, 12636, 37, 14, 1082, 8, 2569, 721, 625, 35, 21, 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...
DateTimePicker Date On DataGrid === mtxtBdate.Value = dataGridView1.SelectedRows[0].Cells["Birthdate"].Value.ToString(); i want this on data Grid view.. this type of syntax use in all other textboxs.. but now how to use this datepicker control syntax.. this sytax is wrong plzz tell me write meas any date that user select on the datetimepicker is show on the datagrid.. mtxtfname.text = datagridView1.SelectRows[0].Cells["fIrstname"].value.ToString(); this sytanx will for text box but for data picker ???
0
[ 2, 1231, 891, 16855, 106, 1231, 27, 1054, 16375, 800, 3726, 3726, 8651, 396, 11872, 8209, 9, 15165, 800, 1054, 16375, 4725, 165, 9, 18, 7138, 5417, 18, 2558, 387, 500, 9, 9725, 18, 2558, 7, 21587, 8209, 7, 500, 9, 15165, 9, 262, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
usage of aws ios sdk for iphone app === We are in the development of an iOS(iPhone) application that consumes a web services. We are planning to host our web service (ReSTful web services) in the AWS. Initially we planned to use Restkit or ASIHttpRequest libraries for invoking the web services. Our web services contains GET, POST api and some image uploading for setting the profile photos of the users. Also we are sending video, audio files in to the database and accessing these files thru web services. We are using JSON as our output format. While searching thru the web we found that AWS SDK for iOS is a (http://aws.amazon.com/sdkforios/). Can somebody advice us is it possible to do the above requirements (GET/POST/Upload Photo/etc) using AWS SDK for iOS? Or shall we continue with other third-party libraries like Restkit or ASIHttpRequest. Please advise us.
0
[ 2, 7514, 16, 21, 10268, 13, 7760, 13, 18, 43, 197, 26, 21024, 4865, 800, 3726, 3726, 95, 50, 19, 14, 522, 16, 40, 13, 7760, 5, 49, 7709, 6, 3010, 30, 16447, 18, 21, 2741, 687, 9, 95, 50, 2334, 20, 2015, 318, 2741, 365, 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...