unified_texts
stringlengths
32
30.1k
OpenStatus_id
int64
0
4
input_ids
list
token_type_ids
list
attention_mask
list
How to prove that a version of a program is more memory efficient? === I have an application which has to process hundred of thousands of records. Right now, I can only process 500 of them at a time. Each batch can take up to 5 minutes to process/analyze (total of ~10 hours of processing). The reason for that limit of 500 records is memory consumption. I think that one of the main reason why our program takes so much memory is that fact that we don't set the size of lists or dictionaries (e.g. new List<MyBigObject>() instead of new List<MyBigObject>(100000)). I did the changes to set the size of collection so that .NET stop creating and copying new lists with extra capacity. Here's my question: how to prove that a version of a program is more memory efficient? Are there performance counters I should look at? Tools? Monitoring?
0
[ 2, 184, 20, 4220, 30, 21, 615, 16, 21, 625, 25, 91, 1912, 8243, 60, 800, 3726, 3726, 31, 57, 40, 3010, 56, 63, 20, 953, 1874, 16, 3805, 16, 742, 9, 193, 130, 15, 31, 92, 104, 953, 3033, 16, 105, 35, 21, 85, 9, 206, 13064, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Inheritance on JDO === I'm trying to write a simple inheritance on JDO (NetBeans, not Eclipse. And not for GAE). This is very simple: @PersistenceCapable @Inheritance(strategy=InheritanceStrategy.NEW_TABLE) public class TestModel1 { } and @PersistenceCapable @Inheritance(strategy=InheritanceStrategy.NEW_TABLE) public class TestModel2 extends TestModel1 { } But I get the following error when I tried to build it type com.ncr.model.QTestModel1 does not take parameters public class QTestModel2 extends com.ncr.model.QTestModel1<TestModel2> implements PersistableExpression<TestModel2> com.ncr.model.QTestModel2 is not abstract and does not override abstract method jdoVersion() in org.datanucleus.query.typesafe.PersistableExpression public class QTestModel2 extends com.ncr.model.QTestModel1<TestModel2> implements PersistableExpression<TestModel2> I've been spending hours on this and no answer on Google nor here before. Please help >.<
0
[ 2, 13852, 27, 487, 537, 800, 3726, 3726, 31, 22, 79, 749, 20, 2757, 21, 1935, 13852, 27, 487, 537, 13, 5, 2328, 863, 5950, 15, 52, 11652, 9, 17, 52, 26, 13, 17721, 6, 9, 48, 25, 253, 1935, 45, 13, 1, 7490, 702, 2940, 4666, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 Map Overlay Item is Not Working === I have developed a Map Application in Android Reading Data from MySQL and also I Have Applied a Security Passoword to application.WHen I run the application all markers loads successfully but when i click on any marker to view the overlay item then application crash unfortunately.Here is My code for making map public class GMapsActivity extends MapActivity { EditText password; Button login; MapView mapView; JSONArray jArray; String result = null; InputStream is = null; StringBuilder sb=null; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); password=(EditText)findViewById(R.id.pass); login=(Button)findViewById(R.id.login); mapView = (MapView) findViewById(R.id.map_view); mapView.setBuiltInZoomControls(true); login.setOnClickListener(new View.OnClickListener(){ public void onClick(View v) { if(password.getText().toString().equals("admin")) { System.out.println("Entering"); mapView.setVisibility(View.VISIBLE); login.setVisibility(View.INVISIBLE); password.setVisibility(View.INVISIBLE); ArrayList<NameValuePair> nameValuePairs = new ArrayList<NameValuePair>(); //http post try{ HttpClient httpclient = new DefaultHttpClient(); HttpPost httppost = new HttpPost("http://sml.com.pk/a/map.php"); httppost.setEntity(new UrlEncodedFormEntity(nameValuePairs)); HttpResponse response = httpclient.execute(httppost); HttpEntity entity = response.getEntity(); is = entity.getContent(); }catch(Exception e){ Log.e("log_tag", "Error in http connection"+e.toString()); } //convert response to string try{ BufferedReader reader = new BufferedReader(new InputStreamReader(is,"iso-8859-1"),8); sb = new StringBuilder(); sb.append(reader.readLine() + "\n"); String line="0"; while ((line = reader.readLine()) != null) { sb.append(line + "\n"); } is.close(); result=sb.toString(); }catch(Exception e){ Log.e("log_tag", "Error converting result "+e.toString()); } //paring data double LAT; double LANG; String INFO; try{ jArray = new JSONArray(result); JSONObject json_data=null; for(int i=0;i<jArray.length();i++){ json_data = jArray.getJSONObject(i); LAT=json_data.getDouble("lat"); LANG=json_data.getDouble("lang"); INFO=json_data.getString("info"); //Overlay code List<Overlay> mapOverlays = mapView.getOverlays(); Drawable drawable = getResources().getDrawable(R.drawable.icon); CustomItemizedOverlay itemizedOverlay = new CustomItemizedOverlay(drawable, this); //GeoPoint point = new GeoPoint(latitudeE6, longitudeE6); GeoPoint point = new GeoPoint((int)(LAT * 1e6),(int)(LANG * 1e6)); OverlayItem overlayitem = new OverlayItem(point, "Shakarganj", INFO); itemizedOverlay.addOverlay(overlayitem); mapOverlays.add(itemizedOverlay); MapController mapController = mapView.getController(); mapController.animateTo(point); mapController.setZoom(6); //Overlay code } } catch(JSONException e1){ Toast.makeText(getBaseContext(), "No Vehicles Found" ,Toast.LENGTH_LONG).show(); } catch (ParseException e1) { e1.printStackTrace(); } } else { Toast.makeText(getBaseContext(), "password is invalid", Toast.LENGTH_SHORT).show(); } } }); } @Override protected boolean isRouteDisplayed() { // TODO Auto-generated method stub return false; } } Please help me to Find out the logical error in my code
0
[ 2, 13005, 2942, 84, 4414, 9101, 25, 52, 638, 800, 3726, 3726, 31, 57, 885, 21, 2942, 3010, 19, 13005, 1876, 1054, 37, 51, 18, 22402, 17, 67, 31, 57, 2435, 21, 1221, 1477, 111, 9587, 20, 3010, 9, 3185, 31, 485, 14, 3010, 65, 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...
PHP Loading objects in one file for easy access === new to the site. Have a quick questions. It is safe or to load objects in one file to call when needed, such as: objects.php <?php require 'autoload.php'; //create global objects $obj = new Object(); $obj2 = new User(); $obj = new Bus(); ?> header.php <?php require 'objects.php'; echo 'Hello ' . $obj2->getName(); ?> Thanks in advance.
0
[ 2, 13, 26120, 12797, 3916, 19, 53, 3893, 26, 2010, 1381, 800, 3726, 3726, 78, 20, 14, 689, 9, 57, 21, 2231, 2346, 9, 32, 25, 1834, 54, 20, 6305, 3916, 19, 53, 3893, 20, 645, 76, 851, 15, 145, 28, 45, 3916, 9, 26120, 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...
JQuery image not centered in IE === I have this page which works in Chrome & Firefox but not quite in IE. The page has pictures which, when clicked, shows a larger image centered on the page and the background is grayed out. http://www.burrardtoastmasters.com/Gallery/2012-Summer.asp Initially, I thought only IE 8 had the issue but I tested IE9 and the issue was there also. If you re-open the image, then the image may be centered. Another issue in IE is the background is not grayed out completely. There is some white space in the right vertical part of the browser. If you resize the browser to make it horizontally longer, the gray section is not dynamically resized. This is the abbreviated html: <div align="center"> <div id="thumbnail"> <A HREF="/Images/Gallery/2012/Summer_Banquet/01.jpg"><img id="800_600" src="/Images/Gallery/2012/Summer_Banquet/01-s.jpg" /></a> <A HREF="/Images/Gallery/2012/Summer_Banquet/02.jpg"><img id="800_600" src="/Images/Gallery/2012/Summer_Banquet/02-s.jpg" /></a> <A HREF="/Images/Gallery/2012/Summer_Banquet/03.jpg"><img id="800_600" src="/Images/Gallery/2012/Summer_Banquet/03-s.jpg" /></a> <A HREF="/Images/Gallery/2012/Summer_Banquet/04.jpg"><img id="800_600" src="/Images/Gallery/2012/Summer_Banquet/04-s.jpg" /></a> <A HREF="/Images/Gallery/2012/Summer_Banquet/05.jpg"><img id="800_600" src="/Images/Gallery/2012/Summer_Banquet/05-s.jpg" /></a> </div> <div id="largeimage"></div> <div id="background"></div> </div> **Jquery section:** // center the large image jQuery.fn.center = function () { //document.write("win height: " + ($(window).height() - this.height() ) / 2+$(window).scrollTop(); this.css("position", "absolute"); this.css("top", ($(window).height() - this.height()) / 2 + $(window).scrollTop() + "px"); this.css("left", ($(window).width() - this.width()) / 2 + $(window).scrollLeft() + "px"); return this; } $(document).ready(function() { // if thumbnail image is clicked, show large image $("#thumbnail img").click(function(e){ // extract the large image's width & height from the image's id attribute var strId = this.id; var strWidth = strId.substring(0, strId.indexOf("_")); var strHeight = strId.substr(strId.indexOf("_") + 1, strId.length - strId.indexOf("_") - 1); // set the image's css size attributes $("#largeimage").css({"min-width" : strWidth + "px"}); $("#largeimage").css({"min-height" : strHeight + "px"}); $("#background").css({"opacity" : "0.7"}) .fadeIn("slow"); $("#largeimage").html("<img src='"+$(this).parent().attr("href")+"' /><br/>") .center() .fadeIn("slow"); return false; }); // 27 - Escape key $(document).keypress(function(e){ if (e.keyCode == 27){ $("#background").fadeOut("slow"); $("#largeimage").fadeOut("slow"); } }); // if background is clicked, hide large image $("#background").click(function(){ $("#background").fadeOut("slow"); $("#largeimage").fadeOut("slow"); }); // if large image is clicked, hide it $("#largeimage").click(function(){ $("#background").fadeOut("slow"); $("#largeimage").fadeOut("slow"); }); }); **CSS:** img { border: none; } #thumbnail img { cursor: pointer; } #largeimage { display: none; position: absolute; background: #FFFFFF; padding: 5px; z-index: 10; /*min-height: 600px;*/ /*min-width: 800px; */ color: #336699; } #background{ display: none; position: absolute; height: 220%; width: 100%; top: 0; left: 0; background: #000000; z-index: 1; }
0
[ 2, 487, 8190, 93, 1961, 52, 10583, 19, 13, 660, 800, 3726, 3726, 31, 57, 48, 2478, 56, 693, 19, 13, 12985, 279, 535, 18219, 47, 52, 1450, 19, 13, 660, 9, 14, 2478, 63, 3104, 56, 15, 76, 15802, 15, 1285, 21, 1662, 1961, 10583, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Orchard CMS 1.4: Adding javascript to specific content, eg, pages === Lets say I want to add an image gallery to a page using the lightbox jquery plugin. Question: How do I add the lightbox script? Of course, I could add it to the layout.cshtml file for my theme, but then every page requires the lightbox script even if it doesn't use it. And then I need to add the following script to the page: <script type="text/javascript"> $(function () { $('#photoGallery a').lightBox({ fixedNavigation: true }); }); </script> Again, I could add it to the layout.cshtml file, but it would be better just to add it to the page. OK, so I could create a layer for that page and add an html widget to a footer zone, but surely there is a better way?
0
[ 2, 12635, 2390, 18, 137, 9, 300, 45, 4721, 8247, 8741, 20, 1903, 2331, 15, 12369, 15, 4434, 800, 3726, 3726, 6884, 395, 31, 259, 20, 3547, 40, 1961, 2246, 20, 21, 2478, 568, 14, 471, 5309, 487, 8190, 93, 10922, 108, 9, 1301, 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...
Adding Models to A Backbone Paginator Collection === I have a View displaying a Collection built using [Backbone Paginator's][1] clientPager. Everything works very well on page load. I also have the client-side code hooked up to Socket.IO which fires model add events every once in a while. I add the model to the Backbone Paginator collection, which then fires the 'add' event in the view: add: function(call){ var collection = this.collection; var $div = this.$(this.div); var call_view = CallsView.generateView(call, collection, this.type); var html = call_view.render().el; $(html).hide().prependTo(this.div).fadeIn('slow'); } This code also works well. However, it doesn't update the pagination. Is there a standard way to do this with Backbone Paginator? I'm a bit lost at this point. Thanks in advance! [1]: https://github.com/addyosmani/backbone.paginator
0
[ 2, 4721, 2761, 20, 21, 24036, 19006, 108, 3457, 1206, 800, 3726, 3726, 31, 57, 21, 1418, 17418, 21, 1206, 392, 568, 636, 1958, 8640, 19006, 108, 3457, 22, 18, 500, 2558, 165, 500, 6819, 6486, 139, 9, 796, 693, 253, 134, 27, 2478, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
reading database dump file into R === I am trying to figure out how to read database dump file into a table in *R*. Here is the first line of the file: `{ "id" : { "id" : "43" }, "type" : "Account::Private", "full_name" : "Joe Doe" }` I need to parse it into a table with the appropriate column headers. I only know `read.table`, `scan`, and basic commands for nicely formatted data sets. Thank you for your help.
0
[ 2, 1876, 6018, 11424, 3893, 77, 761, 800, 3726, 3726, 31, 589, 749, 20, 1465, 70, 184, 20, 1302, 6018, 11424, 3893, 77, 21, 859, 19, 1637, 139, 2483, 9, 235, 25, 14, 64, 293, 16, 14, 3893, 45, 13, 1, 13, 7, 1340, 7, 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...
Using Linux Bash Script to get data from XML file === I have a XML files with data in it that I need to extract with a Linux Bash Script. For example, I need everything in the <name></name> brackets and <description></description> to print out in terminal accordingly (first name in next to first description). What is the best way to do this? I was able to do it with c# using XPath, but I can't do that simply using a Linux Bash Script correct? I know I can get most of it done with awk, sed, grep, cut ect, but I don't think (actually I know I am not) doing it properly. I am at a point were I extracted description data to a file and name to a file, but after a few hours, I realized this is not the best/proper way. Example of how it should read is. - name1 - description1 - name2 - description2 - name3 - (blank) - name4 - description3 Thank you! If I can add any detail to make it clearer, please let me know! (Brain is a little fried from a long day at work)
0
[ 2, 568, 13024, 13158, 3884, 20, 164, 1054, 37, 23504, 3893, 800, 3726, 3726, 31, 57, 21, 23504, 6488, 29, 1054, 19, 32, 30, 31, 376, 20, 10962, 29, 21, 13024, 13158, 3884, 9, 26, 823, 15, 31, 376, 796, 19, 14, 13, 1, 7259, 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...
CodeIgniter and Secrets/API Keys === So im writing code and pushing it to github and pushing it to github etc etc.... Problem is when I do that I am also pushing things like Facebook API keys and config.php encryption keys - anyone know how to push code without doing this?
0
[ 2, 1797, 9693, 242, 106, 17, 7818, 118, 2552, 49, 5534, 800, 3726, 3726, 86, 797, 1174, 1797, 17, 5076, 32, 20, 13, 10404, 20926, 17, 5076, 32, 20, 13, 10404, 20926, 2722, 2722, 9, 9, 9, 9, 1448, 25, 76, 31, 107, 30, 31, 589, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Entity Framework: One Database, Multiple DbContexts. Is this a bad idea? === My impression to date has been that a DbContext is meant to represent your database, and thus, if your application uses one database, you'd want only one DbContext. However, some colleagues want to break functional areas out into separate DbContext classes. I believe comes from a good place -- a desire to keep the code cleaner -- but it seems volatile. My gut's telling me it's a bad idea, but unfortunately my gut feeling is not a sufficient condition for a design decision. So I'm looking for A) concrete examples of why this might be a bad idea, or B) assurances that this'll all work out just fine.
0
[ 2, 9252, 6596, 45, 53, 6018, 15, 1886, 13, 9007, 1126, 11969, 18, 9, 25, 48, 21, 896, 882, 60, 800, 3726, 3726, 51, 6394, 20, 1231, 63, 74, 30, 21, 13, 9007, 1126, 11969, 25, 1380, 20, 3501, 154, 6018, 15, 17, 1086, 15, 100, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 approaches there are in j2ee for asynchronous communication? === I want to know what approaches there are in j2ee that I can use them for asynchronous communication especially in distributed systems?(in fact what approaches there are in java that designed for this aim)
0
[ 2, 98, 7501, 80, 50, 19, 487, 135, 2851, 26, 21, 16023, 1291, 3291, 60, 800, 3726, 3726, 31, 259, 20, 143, 98, 7501, 80, 50, 19, 487, 135, 2851, 30, 31, 92, 275, 105, 26, 21, 16023, 1291, 3291, 1118, 19, 4387, 1242, 60, 5, 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, 0, 0, 0...
How to adjust bitmap image contrast in android? === I went through lot more techniques.But nothing could solve my query.None of those techniques are proper.Either the image becomes blur or become completely dark.So, i need a specific algorithm to adjust the bitmap image contrast.
0
[ 2, 184, 20, 14328, 1142, 15022, 1961, 3710, 19, 13005, 60, 800, 3726, 3726, 31, 296, 120, 865, 91, 4212, 9, 811, 626, 110, 8402, 51, 25597, 9, 15746, 16, 273, 4212, 50, 4119, 9, 18840, 14, 1961, 2633, 10330, 54, 533, 1524, 659, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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...
JDWP exit error AGENT_ERROR_TRANSPORT_INIT(197): No transports initialized [../../../src/share/back/debugInit.c:690] === I have been trying to run with JRebel this configuration: ![enter image description here][1] ![enter image description here][2] Here is my output: c:\JBOSS\jboss-portal-2.7.2\bin\run.bat -c default c:\JBOSS\jboss-portal-2.7.2\bin>set JAVA_OPTS=-Dhttp.proxyHost=188.173.32.78 -Dhttp.proxyPort=3128 -DproxySet=true =============================================================================== JBoss Bootstrap Environment JBOSS_HOME: c:\JBOSS\jboss-portal-2.7.2 JAVA: C:\Program Files\Java\jdk1.6.0_25\bin\java JAVA_OPTS: -Xdebug -Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=n -Dhttp.proxyHost=188.173.32.78 -Dhttp.proxyPort=3128 -DproxySet=true -Dprogram.name=run.bat -server -Xms256m -Xmx512m -XX:MaxPermSize=256m -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 CLASSPATH: C:\Program Files\Java\jdk1.6.0_25\lib\tools.jar;c:\JBOSS\jboss-portal-2.7.2\bin\run.jar =============================================================================== [2012-07-16 12:32:53,968] Artifact app-ear:ear: Artifact is being deployed, please wait... [2012-07-16 12:32:53,972] Artifact my-portlet:war: Artifact is being deployed, please wait... Connected to server [2012-07-16 12:32:54,007] Artifact app-ear:ear: Artifact is deployed successfully FATAL ERROR in native method: JDWP No transports initialized, jvmtiError=AGENT_ERROR_TRANSPORT_INIT(197) ERROR: transport error 202: bind failed: Address already in use ERROR: JDWP Transport dt_socket failed to initialize, TRANSPORT_INIT(510) JDWP exit error AGENT_ERROR_TRANSPORT_INIT(197): No transports initialized [../../../src/share/back/debugInit.c:690] Disconnected from server [1]: http://i.stack.imgur.com/N6T3t.png [2]: http://i.stack.imgur.com/DeMV0.png
0
[ 2, 487, 43, 13790, 4350, 7019, 2267, 1, 29992, 1, 7028, 1993, 1, 108, 242, 5, 21968, 6, 45, 90, 1739, 18, 2104, 1333, 636, 9, 9, 118, 9, 9, 118, 9, 9, 118, 18, 5453, 118, 16608, 118, 1958, 118, 546, 16254, 108, 242, 9, 150, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Sort two arrays the same way === For example, if I have these arrays: var name = ["Bob","Tom","Larry"]; var age = ["10", "20", "30"] And I use `name.sort()` the order of the "name" array becomes: var name = ["Bob","Larry","Tom"]; But, how can I sort the "age" array the same way as "name", so the final output is: var name = ["Bob","Larry","Tom"]; var age = ["10", "30", "20"]
0
[ 2, 2058, 81, 7718, 18, 14, 205, 161, 800, 3726, 3726, 26, 823, 15, 100, 31, 57, 158, 7718, 18, 45, 4033, 204, 800, 636, 7, 12570, 7, 15, 7, 6015, 7, 15, 7, 3779, 622, 7, 12660, 4033, 348, 800, 636, 7, 1036, 7, 15, 13, 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...
Using RestKit, use block to load object, when and how to cancel the request? === [[RKObjectManager sharedManager] loadObjectsAtResourcePath:@"app/site_pattern" usingBlock:^(RKObjectLoader* loader) { [loader setObjectMapping:clientMappring]; loader.delegate = self; shopLoader = loader; }]; Above, I use the block function to load some data in my app, but when I pop this viewcontroller, I don't know when and how to cancel this request . Any idea? - (void)showSelectShop { SelectShopViewController * selectShopViewController = [[SelectShopViewController alloc] initWithNibName:@"SelectShopViewController" bundle:nil]; [self.navigationController pushViewController:selectShopViewController animated:YES]; } More: I try to cancel it in the viewDidUnload - (void)viewDidUnload { [super viewDidUnload]; [shopLoader cancel]; } But it didn't work. I still getting error.
0
[ 2, 568, 760, 13703, 15, 275, 1921, 20, 6305, 3095, 15, 76, 17, 184, 20, 14815, 14, 3772, 60, 800, 3726, 3726, 636, 2558, 7005, 23793, 22256, 2592, 22256, 500, 6305, 23793, 10833, 99, 12097, 8353, 45, 1, 7, 7753, 118, 9097, 1, 5972...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 display data from 3 maps in one table in jsp === I have three maps having data in it. How can i display it in a table in jsp page.
0
[ 2, 184, 20, 3042, 1054, 37, 203, 6867, 19, 53, 859, 19, 487, 3401, 800, 3726, 3726, 31, 57, 132, 6867, 452, 1054, 19, 32, 9, 184, 92, 31, 3042, 32, 19, 21, 859, 19, 487, 3401, 2478, 9, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
infinite loop receive from serial port === from [this][1] I copied the example for serial port configuration: tcgetattr (serialfd, &tty); cfsetospeed(&tty,B115200); cfsetispeed(&tty,B115200); tty.c_cflag = (tty.c_cflag & ~CSIZE) | CS8; tty.c_iflag &= ~IGNBRK; tty.c_lflag = 0; tty.c_oflag = 0; tty.c_cc[VMIN] = 0; tty.c_cc[VTIME] = 5; tty.c_iflag &= ~(IXON | IXOFF | IXANY); tty.c_cflag |= (CLOCAL | CREAD); tty.c_cflag &= ~(PARENB | PARODD); tty.c_cflag |= 0; tty.c_cflag &= ~CSTOPB; tty.c_cflag &= ~CRTSCTS; My actual code is like this: char buf[100]; write(serialfd, "PING", strlen("PING")); fsync(serialfd); while (1) { read(serialfd, buf, sizeof(buf)); printf("length: %d\n", strlen(buf)); } In this case it is printing `length: 6` infinitely without stopping. when I change `tty.c_cc[VMIN] = 1` and `tty.c_cc[VTIME] = 0` it doesn't read.(it blocks in `read()`) I'm using debian 6.0.5 with usb to serial converter. I open serial port like this: serialfd = open("/dev/ttyUSB0", O_RDWR | O_NOCTTY | O_SYNC); [1]: http://stackoverflow.com/questions/6947413/how-to-open-read-and-write-from-serial-port-in-c
0
[ 2, 9698, 5293, 2588, 37, 5956, 1295, 800, 3726, 3726, 37, 636, 1565, 500, 2558, 165, 500, 31, 18225, 14, 823, 26, 5956, 1295, 8091, 45, 13, 6668, 3060, 10303, 139, 13, 5, 18, 9605, 9641, 43, 15, 279, 12007, 6, 73, 10084, 18, 119...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Could I submit mutiple apk file on google play for mutiple target? === I'm tending to release and submit to GoolgePlay two apk files of the same application. One with android sdk 7 for android version lower than 4.0, one with android sdk 14 for android 4.0 and upper. Is it possible?
0
[ 2, 110, 31, 12298, 22072, 5106, 21, 17244, 3893, 27, 8144, 418, 26, 22072, 5106, 2935, 60, 800, 3726, 3726, 31, 22, 79, 5480, 68, 20, 830, 17, 12298, 20, 162, 1823, 834, 5438, 81, 21, 17244, 6488, 16, 14, 205, 3010, 9, 53, 29, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Editing data from MySQL via PHP === I am running into a frustrating problem with a PHP script that's supposed to allow me to edit individual rows within my MySQL database. This is the file where all of the rows from the database are displayed; it works just like it's supposed to. <table cellpadding="10"> <tr> <td>ID</td> <td>First Name</td> <td>Last Name</td> <td>E-mail</td> <td>Phone</td> </tr> <?php $username="username here"; $password="password here"; $database="database name here"; mysql_connect(localhost,$username,$password); @mysql_select_db($database) or die( "Unable to select database"); $query="SELECT * FROM students"; $result=mysql_query($query); mysql_close(); while ($row=mysql_fetch_array($result)){ echo ("<tr><td>$row[id]</td>"); echo ("<td>$row[first]</td>"); echo ("<td>$row[last]</td>"); echo ("<td>$row[email]</td>"); echo ("<td>$row[phone]</td>"); echo ("<td><a href=\"StudentEdit.php?id=$row[id]\">Edit</a></td></tr>"); } echo "</table>"; ?> As you can see, each row has an "Edit" link that is supposed to allow the user to edit that individual student's data. Here, then, is StudentEdit.php: <?php $username="username"; $password="password"; $database="database"; mysql_connect(localhost,$username,$password); $student_id = $_GET[id]; $query = "SELECT * FROM students WHERE id = '$student_id'"; $result = mysql_query($query); $row = mysql_fetch_array($result); mysql_close(); ?> <form method="post" action="EditStudentData.php" /> <table> <tr> <td><input type="hidden" name="id" value="<? echo "$row[id]" ?>"></td> </tr> <tr> <td>First Name:</td> <td><input type="text" name="first" value="<? echo "$row[first]" ?>"></td> </tr> <tr> <td>Last Name:</td> <td><input type="text" name="last" value="<? echo "$row[last]" ?>"></td> </tr> <tr> <td>Phone Number:</td> <td><input type="text" name="phone" value="<? echo "$row[phone]" ?>"></td> </tr> <tr> <td>E-mail:</td> <td><input type="text" name="email" value="<?echo "$row[email]" ?>"></td> </tr> </table> </form> When I execute this, however, I get the following error message: Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home4/lukaspl1/public_html/StudentEdit.php on line 12 Any ideas what's wrong, and how to fix it? Thank you in advance!
0
[ 2, 9510, 1054, 37, 51, 18, 22402, 1197, 13, 26120, 800, 3726, 3726, 31, 589, 946, 77, 21, 25568, 1448, 29, 21, 13, 26120, 3884, 30, 22, 18, 2293, 20, 1655, 55, 20, 9392, 1359, 11295, 363, 51, 51, 18, 22402, 6018, 9, 48, 25, 14...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
how to connect from online server to offline server in mysql === I have a online website and another offline website. I want to create a cron job in online server by using offline database. Is it possible? how can do this? Regards, Nandu SR
1
[ 2, 184, 20, 6379, 37, 2087, 8128, 20, 168, 1143, 8128, 19, 51, 18, 22402, 800, 3726, 3726, 31, 57, 21, 2087, 2271, 17, 226, 168, 1143, 2271, 9, 31, 259, 20, 1600, 21, 13, 19587, 1205, 19, 2087, 8128, 34, 568, 168, 1143, 6018, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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...
apt-cdrom not working on my ubuntu 12.04 LTS === i mount the iso file in /media/cdrom then i run apt-cdrom -m -d /media/cdrom add <i># apt-cdrom -m -d /media/cdrom add </i> <i>Repeat this process for the rest of the CDs in your set.</i> nothing happened anyone help me out
2
[ 2, 21, 4417, 8, 6324, 8541, 52, 638, 27, 51, 287, 12968, 2473, 390, 9, 3277, 7137, 18, 800, 3726, 3726, 31, 2149, 14, 11899, 3893, 19, 13, 118, 8260, 118, 6324, 8541, 94, 31, 485, 21, 4417, 8, 6324, 8541, 13, 8, 79, 13, 8, 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...
Cannot find the declaration of element 'beans:beans === I am try for role based access in spring but got the following error:- org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 7 in XML document from ServletContext resource [/WEB-INF/spring-security.xml] is invalid; nested exception is org.xml.sax.SAXParseException: cvc-elt.1: Cannot find the declaration of element 'beans:beans'. at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:396) at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:334) at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:302) at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:143) at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:178) at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:149) at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:124) at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:93) at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefre ******And here is my spring-security.xml:-****** <?xml version="1.0" encoding="UTF-8"?> <beans:beans xmlns="http://www.springframework.org/schema/security" xmlns:beans="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-3.1.xsd"> <http auto-config="true"> <intercept-url pattern="/welcome*" access="ROLE_USER" /> <form-login login-page="/login" default-target-url="/welcome" authentication-failure-url="/loginfailed" /> <logout logout-success-url="/logout" /> </http> <authentication-manager> <authentication-provider> <user-service> <user name="a" password="1" authorities="ROLE_USER" /> </user-service> </authentication-provider> </authentication-manager> </beans:beans>
0
[ 2, 1967, 477, 14, 7098, 16, 4520, 13, 22, 863, 5950, 45, 863, 5950, 800, 3726, 3726, 31, 589, 1131, 26, 597, 432, 1381, 19, 1573, 47, 330, 14, 249, 7019, 45, 8, 13, 5583, 9, 15827, 8361, 3783, 9, 863, 5950, 9, 17455, 93, 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...
Contacts displaying in reverse order === Hi I have to display the contacts from the addressbook in the reverse order i.e from Z - A order along with the special characters order exactly reverse to that of the contacts in the iphone in my tableview. I am successful in fetching the contacts from the list can anyone help me to sort the list exactly reverse to that of the contact list
0
[ 2, 11894, 17418, 19, 7006, 389, 800, 3726, 3726, 4148, 31, 57, 20, 3042, 14, 11894, 37, 14, 3218, 5199, 19, 14, 7006, 389, 31, 9, 62, 37, 2052, 13, 8, 21, 389, 303, 29, 14, 621, 1766, 389, 1890, 7006, 20, 30, 16, 14, 11894, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 cron job dynamically === I want to add a cron job dynamically by storing the command in a text file and then using the **exec** command in my PHP code to run it. My text file named **cron.txt** contains */5 * * * * /usr/local/bin/php -f public_html/bookmark/email.php My relevant PHP code is exec('crontab cron.txt', $a, $return); When I run the code it the **$return** is set to error code **1** and no cron job is added. I have done this before without issues but I am missing something today!
0
[ 2, 4721, 13, 19587, 1205, 7782, 1326, 800, 3726, 3726, 31, 259, 20, 3547, 21, 13, 19587, 1205, 7782, 1326, 34, 25615, 14, 1202, 19, 21, 1854, 3893, 17, 94, 568, 14, 13, 1409, 1706, 3319, 1409, 1202, 19, 51, 13, 26120, 1797, 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...
Velocity log file location? === I'm using Apache Velocity v1.7 but I'm not having any velocity.properties. What I observed is that whenever I run my program, it creates velocity.log file in some location. My question is how do I change the location of this velocity.log file to certain directory? Also, what lines should I add in my log4j.xml to have the proper debug/warn logging? Thanks!
0
[ 2, 10700, 6738, 3893, 1474, 60, 800, 3726, 3726, 31, 22, 79, 568, 17140, 10700, 566, 165, 9, 465, 47, 31, 22, 79, 52, 452, 186, 10700, 9, 10890, 106, 3915, 9, 98, 31, 3634, 25, 30, 6634, 31, 485, 51, 625, 15, 32, 9695, 10700, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Conversion of existing website to mobile format === I have to develop a website which can take the data from existing website and convert it into the mobile version. Also let the user to further arrange and modify the contents from a tool that provides WYSIWYG functionality. I have explored lot of related stuff but the core part I want to know is how this conversion will take place. Any existing site should automatically get converted into its mobile friendly version. So is there any script or code that which can scrap the data from existing website and can automatically generate its mobile friendly version or some manual programming will be required. I am talking in terms of the implementation part. Which tools or technology will be helpful? Thanks.
0
[ 2, 6263, 16, 3149, 2271, 20, 3241, 2595, 800, 3726, 3726, 31, 57, 20, 2803, 21, 2271, 56, 92, 247, 14, 1054, 37, 3149, 2271, 17, 8406, 32, 77, 14, 3241, 615, 9, 67, 408, 14, 4155, 20, 653, 12400, 17, 17579, 14, 8478, 37, 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 add !important to a stylesheet rule using JavaScript? === I've got a reference to a `CSSStyleRule` object in JavaScript and I want to update the style for `border-top-color` to `red !important`. If I assign the value `red`, no problems occur. If I assign the value `red !important`, the value is ignored (i.e. not assigned). myStyleSheetRule.style.borderTopColor = 'red'; // success myStyleSheetRule.style.borderTopColor = 'red !important'; // fail How do I set the !important flag? Note that it has to be done via a stylesheet rule accessed programatically. In my use case, I can't assign a style attribute or anything else. I'm using Chrome on Windows 7.
0
[ 2, 184, 20, 3547, 13, 187, 25716, 20, 21, 1034, 17627, 1828, 568, 8247, 8741, 60, 800, 3726, 3726, 31, 22, 195, 330, 21, 2801, 20, 21, 13, 1, 6824, 18, 4381, 16154, 1, 3095, 19, 8247, 8741, 17, 31, 259, 20, 11100, 14, 1034, 26...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How to display the values of array in textbox? === I have a text box where i have to display the array values that i get from api and the problem is, I have used like this <input name="f" type="text" id="f" value=entries.f> and i get the value as ["V"] incase of a single value and ["V", incase of multiple values so how can i display the array values like V, N in a textbox?
0
[ 2, 184, 20, 3042, 14, 4070, 16, 7718, 19, 1854, 5309, 60, 800, 3726, 3726, 31, 57, 21, 1854, 1649, 113, 31, 57, 20, 3042, 14, 7718, 4070, 30, 31, 164, 37, 21, 2159, 17, 14, 1448, 25, 15, 31, 57, 147, 101, 48, 13, 1, 108, 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...
Using maven for perl projects === We have seen Maven perform very well for our Java-based projects. I see from [this question](http://stackoverflow.com/questions/1168960/maven-for-other-languages) that non-java projects can also be retrofit as maven modules, albeit they will only be using the maven-exec-plugin for different goals. On googling, I saw [maven-perl-plugin](http://code.google.com/p/maven-perl-plugin) but it is still a 1.0-SNAPSHOT with sporadic updates, but certainly looks very promising. Has anyone used this one or any other competitor which will relieve me of writing non-interesting pom boiler-plate?
0
[ 2, 568, 1216, 3124, 26, 416, 255, 2314, 800, 3726, 3726, 95, 57, 541, 1216, 3124, 2985, 253, 134, 26, 318, 8247, 8, 1281, 2314, 9, 31, 196, 37, 636, 1565, 1301, 500, 5, 21127, 6903, 25325, 2549, 9990, 9, 960, 118, 24652, 18, 116...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Customizing Map in raphaeljs === I am trying to construct a customized map in **raphaeljs**, in this i want do is, making it like a fadein fadeout effect of the countries that appear sequentially, for it i have used `setInterval()` Event... I have tried some stuff right here but it manages to show the last item, it fadein fadeout... I want to show that sequentially.... Can anyone help??? Here is the sample:- http://jsfiddle.net/vpmzT/
0
[ 2, 5816, 3335, 2942, 19, 13874, 728, 18, 800, 3726, 3726, 31, 589, 749, 20, 6960, 21, 28779, 2942, 19, 13, 1409, 525, 18311, 15664, 18, 1409, 15, 19, 48, 31, 259, 107, 25, 15, 544, 32, 101, 21, 11381, 108, 11381, 1320, 1590, 16,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How to set Intellij to alert when there is no "this" for instance variable === As the title says, how do I set IntelliJ to warn me when there is no this when accessing instance variables. I know in Eclipse you could set this but I'm not sure how to do that in IntelliJ. For example private String field1 field1 << I should be this.field1 instead.
0
[ 2, 184, 20, 309, 19, 4213, 9999, 20, 7863, 76, 80, 25, 90, 13, 7, 1565, 7, 26, 4851, 7612, 800, 3726, 3726, 28, 14, 581, 898, 15, 184, 107, 31, 309, 19, 4213, 9999, 20, 9296, 55, 76, 80, 25, 90, 48, 76, 1381, 68, 4851, 121...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
SQL JOIN using COUNT === I want to use sql JOIN with COUNT in a way that using the COUNT as the condition for the JOIN. eg :- **SELECT * FROM tbl1 INNER JOIN (SELECT * FROM tbl2) t2 ON (SELECT COUNT(*) FROM tbl1) > 0** Is this possible or can someone please tell me another way ? Thanks
0
[ 2, 4444, 255, 1865, 568, 2468, 800, 3726, 3726, 31, 259, 20, 275, 4444, 255, 1865, 29, 2468, 19, 21, 161, 30, 568, 14, 2468, 28, 14, 2874, 26, 14, 1865, 9, 12369, 13, 45, 8, 13, 1409, 18, 16964, 1637, 37, 13, 38, 6287, 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...
Pass a simple string from controller to a view MVC3 === I know this seems pretty basic, and it should be, but I cant find out where I am going wrong. (I hve read other articles with similar titles on SO, and other resources on the web but still cant figure it out), so any help would be appreicated. I have a controller and in it I am setting a string variable. Now I dont mind if this takes the form of a property, an ActionResult, or a streight method. I just want a simple string that I can play with in the controller, and return it to the view. Essentially what I am trying to do is list the files in a given folder. So my logic is like this: 1. Find the current folder (partially successful) 2. Append the path to the where the files you want to located are. i.e. if my current folder is Web\ then I will append something like "Content\CSS" if I wanted to list all the CSS files for example. (I do this because I want to allow the user to dynamically change the site by selecting the css to apply). So it would look like: CurrentPath += "Content\CSS" 3. I want load the file names into an array or list 4. I want to pass this list to my view to render in a combo box (which is on my _Layout.cshtml). It is important to know that I am trying to view the string on the _Layout.cshtml as I cant just build another view for it. (Unless I am wrong, in that case I would appreicate any help). At the moment I am still working on getting a simple string passed to my view in a way I can freely manulapate it like in step 2. I started off with a separate static class and a global variable: public static class MyTheme { public static string CurrentPath = HostingEnvironment.MapPath("~"); } In my view I had: @Html.Label(MyProject.Web.Controllers.MyTheme.CurrentPath); This worked but when I tried to use an if statement to determine if the string was null or empty I got errors. So my next attempts all failed. Next I decided to bring it into a controller (in this case my BaseController) and this is when I started running into problems. Code below: Inside BaseController Class public ActionResult ThemePath() { string currentPath = Server.MapPath("~"); if (string.IsNullOrEmpty(currentPath)) { currentPath = "Error!"; } else { currentPath = "Our Path Is: " + currentPath; } return View(currentPath); } I dont know how to access and run this from inside my _Layout.cshtml view So next I tried a standard method inside BaseController: public string ThemePath() { string currentPath = Server.MapPath("~"); if (string.IsNullOrEmpty(currentPath)) { currentPath = "Error!"; } else { currentPath = "Our Path Is: " + currentPath; } return currentPath; } Again I dont know how to access it in the view Finally I tried to use ViewBag and ViewData and now I am just going bonkers! So in my base controller I have: public string ThemePath() { ViewBag.currentPath = Server.MapPath("~"); if (string.IsNullOrEmpty(ViewBag.currentPath)) { ViewBag.currentPath = "Error!"; } else { ViewBag.currentPath = "Our Path Is: " + ViewBag.currentPath; } return ViewBag.currentPath; } and in my view I have @Html.Label(ViewBag.CurrentPath); or even @Html.Label(ViewBag.CurrentPath.ToString()); With the following friendly little error messages: CS1973: 'System.Web.Mvc.HtmlHelper<dynamic>' has no applicable method named 'Label' but appears to have an extension method by that name. Extension methods cannot be dynamically dispatched. Consider casting the dynamic arguments or calling the extension method without the extension method syntax. Finally I tried ViewData in the base as follows: public string ThemePath() { ViewData["currentPath"] = Server.MapPath("~"); if (string.IsNullOrEmpty(ViewData["currentPath)"].ToString())) { ViewData["currentPath"] = "Error!"; } else { ViewData["currentPath"] = "Our Path Is: " + ViewData["currentPath"]; } return ViewData["currentPath"].ToString(); } and correspondingly in the _Layout.cshtml I tried: @Html.Label(ViewData["CurrentPath"].ToString()); Without the .ToString() I get the above error: With the .ToString() I get a null refrence execption error. So I am kinda lost now and dont really know where I am going wrong. Thanks in advance for any help.
0
[ 2, 1477, 21, 1935, 3724, 37, 9919, 20, 21, 1418, 307, 8990, 240, 800, 3726, 3726, 31, 143, 48, 2206, 1772, 2125, 15, 17, 32, 378, 44, 15, 47, 31, 2973, 477, 70, 113, 31, 589, 228, 1389, 9, 13, 5, 49, 746, 195, 1302, 89, 3376...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
HTML Form "placeholder" not working in IE 8 === Hi I have created a form on my website. I am using `placeholder="Full Name"` but nothing is showing up in the form when viewed in IE8 (and probably other IE versions) I have tried using `value="" onfocus="if (this.value == 'Full Name') {this.value = '';}" onblur="if (this.value == '') {this.value = 'Full Name';}"` but the form is still empty. For some reason 'Full Name' shows up when you click on the form, then off it. The website I am working on is [usspcatalystcentre.org.uk][1] and you can see what I mean. The first two forms (Title & Full Name) is where I have tried using value="" onfocus="if (this.value == 'Full Name') {this.value = '';}" onblur="if (this.value == '') {this.value = 'Full Name';}" <br/> The rest of the form are where I have just used `placeholder` Here is the actual code I am working on <form action="contact.php" method="post"> <input id=title name=title type=text value="" onfocus="if(this.value=='Username') this.value='';" onblur="if(this.value=='') this.value='Username';" required class="top-formfields" value='<?php print $_SESSION['title']?>'> <br /><br /> <input id=fullname name=fullname type=text value="" onfocus="if(this.value=='Full Name') this.value='';" onblur="if(this.value=='') this.value='Full Name';" required class="top-formfields" value='<?php print $_SESSION['fullname']?>'> <br /><br /> <input id=companyname name=companyname type=text placeholder="Company Name" required class="top-formfields" value='<?php print $_SESSION['companyname']?>'> <br /><br /> <input id=companynumber name=companynumber type=text placeholder="Company Registered Number" required class="top-formfields" value='<?php print $_SESSION['companynumber']?>'> <br /><br /> <textarea id=address name=address rows=5 placeholder="Address" required class="top-textarea"><?php print $_SESSION['address']?></textarea> <br /><br /> <input id=postcode name=postcode type=text placeholder="Post Code" required class="top-formfields" value='<?php print $_SESSION['postcode']?>'> <br /><br /> <input id=phonenumber name=phonenumber type=text placeholder="Phone Number" required class="top-formfields" value='<?php print $_SESSION['phonenumber']?>'> <br /><br /> <input id=email name=email type=text placeholder="Email" required class="top-formfields" value='<?php print $_SESSION['email']?>'> <br /><br /> <input id=mobile name=mobile type=text placeholder="Mobile" required class="top-formfields" value='<?php print $_SESSION['mobile']?>'> <br /><br /> <input id=website name=website type=text placeholder="Website URL" required class="top-formfields" value='<?php print $_SESSION['website']?>'> <br /><br /> Thanks in advance, Tom
0
[ 2, 13, 15895, 505, 13, 7, 5119, 12427, 7, 52, 638, 19, 13, 660, 469, 800, 3726, 3726, 4148, 31, 57, 679, 21, 505, 27, 51, 2271, 9, 31, 589, 568, 13, 1, 5119, 12427, 3726, 7, 13727, 204, 7, 1, 47, 626, 25, 3187, 71, 19, 14,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
What is the industry term for removing personal information from a database? === What is the term for removing personal information from a database? I've heard "sanitized", but this tends to used for when you're inserting data *into* the database. Googling anything similar to "remove personal data from database" returns results that are no where near what I am looking for.
2
[ 2, 98, 25, 14, 1230, 981, 26, 9096, 1319, 676, 37, 21, 6018, 60, 800, 3726, 3726, 98, 25, 14, 981, 26, 9096, 1319, 676, 37, 21, 6018, 60, 31, 22, 195, 752, 13, 7, 2729, 242, 1333, 7, 15, 47, 48, 14261, 20, 147, 26, 76, 42,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Is it good for a .Net developer to step into salesforce technology === i have 3 years of experience in .Net technologies like sql server,c# and asp.net. Nowadays as cloud computing is booming up i want to step into SalesForce.com. I heard that for salesforce most of the companies prefers Java developers only is this true? and is it a wise decision for a .Net developer to step into salesforce technology. Pls advice me....
2
[ 2, 25, 32, 254, 26, 21, 13, 9, 2328, 10058, 20, 1424, 77, 2598, 8774, 1099, 800, 3726, 3726, 31, 57, 203, 122, 16, 1496, 19, 13, 9, 2328, 5740, 101, 4444, 255, 8128, 15, 150, 5910, 17, 28, 306, 9, 2328, 9, 15694, 28, 4005, 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...
resize text to largest possible size to fit a drawing rect with wraping === this are many similar questions asked to this but no good answer? i use context drawing to draw input text on a certain rect size "720,576", now i need to fit the whole text in that to the maximum font size, while maintaining the rows count? i tried to create an equation to calculate that but no use. i even tried to loop size till text is clipped but i couldn't test that condition, and i searched for a week to see something similar but no avail! lastly i tried to use a view box which is near what i want but it wont let the textblock inside to multiline as it always re-size the width contain all text in one line. here is what i got: <Viewbox > <Grid Width="720" Height="576"> <TextBlock TextWrapping="Wrap" HorizontalAlignment="Center" VerticalAlignment="Center" Text="how are you doining how are you doining how are you doining how are you doining how are you doining how are you doining how are you doining how are you doining how are you doining" /> </Grid> </Viewbox> any help would be appreciated, thanks.
0
[ 2, 302, 10454, 1854, 20, 1075, 938, 1072, 20, 2742, 21, 3533, 6042, 38, 29, 8118, 68, 800, 3726, 3726, 48, 50, 151, 835, 2346, 411, 20, 48, 47, 90, 254, 1623, 60, 31, 275, 4141, 3533, 20, 2003, 6367, 1854, 27, 21, 1200, 6042, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
SELECT statement needs to output value conditional on NULL data === It was hard to condense in the title what I need... Here it goes. This is for SQL Server 2008. For a reason that is too long to explain here, I need to have a SELECT statements that will display, among other columns, a value of 1 if 4 columns have a value null. Something like this. SELECT name, lastname, p1, p2, p3, p4, "1 if p1,p2,p3 and p4 are all NULL, 0 otherwise" city, st, zip FROM mytable The questions is how to I translate to code this: **"1 if p1,p2,p3 and p4 are all NULL, 0 otherwise"** ? I tried CASE len(p1+p2+p3+p4) WHEN NULL 1 ELSE 0 END But it didn't work. even though when I do SELECT len(p1+p2+p3+p4) FROM mytable The result iS NULL. I tried IF ELSE, but it doesn't seem to be welcome in a SELECT statement. Ideas? Thanks.
0
[ 2, 5407, 3331, 2274, 20, 5196, 1923, 21206, 27, 16203, 1054, 800, 3726, 3726, 32, 23, 552, 20, 19691, 23157, 19, 14, 581, 98, 31, 376, 9, 9, 9, 235, 32, 1852, 9, 48, 25, 26, 4444, 255, 8128, 570, 9, 26, 21, 1215, 30, 25, 266...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 Solidworks have a command line like Rhino and AutoCAD? === If it does, anyone know how to toggle it on? If it doesn't, anyone know a good doctor for anger management?
0
[ 2, 630, 2941, 7684, 57, 21, 1202, 293, 101, 18642, 17, 3108, 13489, 60, 800, 3726, 3726, 100, 32, 630, 15, 1276, 143, 184, 20, 20, 263, 4875, 32, 27, 60, 100, 32, 1437, 22, 38, 15, 1276, 143, 21, 254, 1687, 26, 3388, 1097, 60,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
How to access vars in theory arithmetic in the user theory plug-ins? === In the user theory plug-in, suppose I have a customer sort "T" and I defined a function "f" with "Z3_func_decl" on T, which takes an argument of sort T and returns sort Int(sort made by "Z3_mk_int_sort"). I also have other constraints on the returned Int value. In the search, I want to capture the concrete value of the Int return value in some callbacks (e.g. new_assignment or new_eq callbacks) so that I can make additional assertions to solve the argument value of sort T. But the problem is those callback will not be invoked in the search. I took a look at the Z3_context of the SAT solution. In the theory arithmetic, I saw: vars: v0 #24 lo: -oo, up: 4, value: 0, occs: 0, atoms: 1, int , non-base , shared: 0, activity: 0, unassigned: 0, rel: 1, def: #24 The "#24" is my function and the "4" shown in "up" is the SAT solution of the return value of my function. My question is how can I get the value "4" in the search. I tried to find it in the equivalence classes of #24 in the callback of final_check but no luck there. Thanks!
0
[ 2, 184, 20, 1381, 4033, 18, 19, 1639, 21211, 19, 14, 4155, 1639, 10922, 8, 108, 18, 60, 800, 3726, 3726, 19, 14, 4155, 1639, 10922, 8, 108, 15, 5787, 31, 57, 21, 7705, 2058, 13, 7, 38, 7, 17, 31, 2811, 21, 1990, 13, 7, 410, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 use jQuery Checkboxs to select and then open and/or print documents stored in a content system (html link to get .pdf doc) === I'm a noob to all this and getting stuck! I have a table that is something like this: <tr class="req"> <td><input name="checkbox" type="checkbox" id="Pform70" /></td> <td align="left" ><a href="https://www.yadayada.com/uat088922.pdf" title="Form Title" id="Pform70" target=new>Pform70</a></td> <td>Required</td> <td>Form Title </td> <td>ksdjasdjf;alsdjfal; </td> So - I want to have a button above the table that will, when clicked, either open all the checked documents or print the checked documents. I've been searching, come close, but not close enough. Thanks all!
0
[ 2, 184, 92, 31, 275, 487, 8190, 93, 2631, 5309, 18, 20, 5407, 17, 94, 368, 17, 118, 248, 4793, 4374, 8214, 19, 21, 2331, 329, 13, 5, 15895, 3508, 20, 164, 13, 9, 11124, 9765, 6, 800, 3726, 3726, 31, 22, 79, 21, 90, 4995, 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...
Initiate drag after delay in jQuery UI Draggable without having to move mouse? === I have a draggable like so: $(".tab li").draggable({ revert: true, delay: 1000, opacity: .75, helper: "clone", appendTo: "body" }) .bind("dragstart", this.doSomething) .bind("dragstop", this.undoSomething); So, after a second of holding the mouse, the dragging may begin. This works fine as long as you move the mouse after 1 second. Immediately upon moving the mouse, the dragstart event is dispatched like it should be. What I want is 'dragstart' to trigger after 1 second even if you don't drag the mouse. I know I can do this with: .bind("mousedown", this.setSomeIntervalAndWait) but I need access to the ui.draggable element that is created as part of draggable() so the mousedown/mouseup solution won't do. Is this possible without modifying jQueryUI to trigger the event upon the delay instead of the mouse movement? I can hack something together no problem using timeouts, cloning the object, positioning it and removing it on 'dragstart' but I'm hoping for something less convoluted.
0
[ 2, 17014, 5501, 75, 7255, 19, 487, 8190, 93, 13, 5661, 5501, 263, 579, 366, 452, 20, 780, 7567, 60, 800, 3726, 3726, 31, 57, 21, 5501, 263, 579, 101, 86, 45, 5579, 5, 7, 9, 15783, 2093, 7, 6, 9, 3030, 4572, 579, 5, 1, 24156,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Emulate a callback to the jQuery offset function? === I'm positioning a DIV using the jQuery `offset()` function. To avoid having the DIV flash in the incorrect position, I'm hiding the DIV prior to the positioning and then showing the DIV again afterwards. However, there is a synchronization issue and on some platforms (e.g. iPhone) I can still see the flash. What's the best way to emulate a callback function for the `offset()` function? $('div').hide(); y = Math.round(($(window).height() - $('div').outerHeight())/2); $('div').offset({top : y}); $('div').fadeIn();
0
[ 2, 23804, 21, 645, 1958, 20, 14, 487, 8190, 93, 17493, 1990, 60, 800, 3726, 3726, 31, 22, 79, 649, 68, 21, 13, 12916, 568, 14, 487, 8190, 93, 13, 1, 1299, 3554, 5, 6, 1, 1990, 9, 20, 2658, 452, 14, 13, 12916, 4433, 19, 14, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How can I insert an image in a UILabel, or make it look like I did? === I am writing a geometry based app. At one point in the app, there will be a UITableView with some custom cells. These cells contain UILabels. Amid the text of some these labels, I want to insert symbols that look these two triangles: ![image](http://media.wiley.com/Lux/73/258473.image0.jpg) However, since I cannot find these symbols in any Apple fonts, is there a way to insert an image into the string in place of a symbol?
0
[ 2, 184, 92, 31, 14692, 40, 1961, 19, 21, 13, 5661, 21018, 15, 54, 233, 32, 361, 101, 31, 144, 60, 800, 3726, 3726, 31, 589, 1174, 21, 11689, 432, 4865, 9, 35, 53, 454, 19, 14, 4865, 15, 80, 129, 44, 21, 13, 11193, 579, 4725,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Text indexing/searching in a browser === I wanted to know how the text loaded in a browser is indexed.<br/> Eg. If I load a news article in Firefox or Google Chrome, and then if I do a `Ctrl+F` to search for a specific word, the browser finds the word almost instantaneously. I tried to search for this online, but could not find any articles or forums which talk about this. Thanks.
0
[ 2, 1854, 4348, 68, 118, 25136, 68, 19, 21, 16495, 800, 3726, 3726, 31, 417, 20, 143, 184, 14, 1854, 8572, 19, 21, 16495, 25, 4348, 69, 9, 1, 5145, 118, 1, 12369, 9, 100, 31, 6305, 21, 996, 2002, 19, 535, 18219, 54, 8144, 13, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How do you change x-axis labels in excel? === Right now, the x-axis labels for my plot is: 0,2,4,6,8,10. I want to change it to years: 2013, 2014, 2015, etc... How would I do this?
0
[ 2, 184, 107, 42, 753, 993, 8, 19676, 13173, 19, 20700, 60, 800, 3726, 3726, 193, 130, 15, 14, 993, 8, 19676, 13173, 26, 51, 3798, 25, 45, 713, 15, 135, 15, 300, 15, 379, 15, 457, 15, 1036, 9, 31, 259, 20, 753, 32, 20, 122, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Aligning all the app to the right === I've searched how can I align the app to the right side and the text to be written from right to left. <br /> The only thing I've found and succeeded to do is to make the text be written from right to left by adding <code>android:gravity="right"</code><br /> in the EditText and the Button, but still their sort in the line if from the left to the right.<br /> The activity_main.xml file - <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:gravity="right" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="horizontal" > <EditText android:id="@+id/text_message" android:gravity="right" android:layout_weight="1.0" android:layout_width="0dp" android:layout_height="wrap_content" android:hint="@string/text_message" /> <Button android:layout_height="wrap_content" android:gravity="right" android:layout_width="wrap_content" android:text="@string/send_button" android:onClick="ButtonClicked" /> <Button android:layout_height="wrap_content" android:gravity="right" android:layout_width="wrap_content" android:text="@string/delete_button" android:onClick="DeleteClicked" /> </LinearLayout> What I meant in "the sort is from the left to the right" is that the EditText is written before the "Send" button, and the "Send" button id written before the "Delete" button - so what's shown is<br /> "[___________x_] [Send][Delete]" and not "[Delete][Send][___________]", as I would want to.
0
[ 2, 23389, 68, 65, 14, 4865, 20, 14, 193, 800, 3726, 3726, 31, 22, 195, 9036, 184, 92, 31, 23389, 14, 4865, 20, 14, 193, 270, 17, 14, 1854, 20, 44, 642, 37, 193, 20, 225, 9, 13, 1, 5145, 13, 118, 1, 14, 104, 584, 31, 22, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
SharePoint: How to combine Filter from Business data list with External List === SharePoint External List Web Part allows users to edit/view/delete an item in the list, and the Business data list web part has a filter to allow users to search an external list but the results are read-only. I would like to know to program or create an extendable filter like the one in the Business data to search the external list and results are shown as the Editable external list. Thanks a lot for your help.
0
[ 2, 1891, 3132, 45, 184, 20, 12287, 11945, 37, 508, 1054, 968, 29, 4886, 968, 800, 3726, 3726, 1891, 3132, 4886, 968, 2741, 141, 2965, 3878, 20, 9392, 118, 4725, 118, 24249, 591, 40, 9101, 19, 14, 968, 15, 17, 14, 508, 1054, 968, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Creating Sessionless page in Stripes === I have a Stripes website and I will have one page that will get lots of hits, and I was asked to make sure Stripes does not create a user session when someone navigates to this page. Is there a way to make sure does not create a session when a user goes to a certain action?
0
[ 2, 2936, 3723, 923, 2478, 19, 15878, 800, 3726, 3726, 31, 57, 21, 15878, 2271, 17, 31, 129, 57, 53, 2478, 30, 129, 164, 7503, 16, 3858, 15, 17, 31, 23, 411, 20, 233, 562, 15878, 630, 52, 1600, 21, 4155, 3723, 76, 737, 20782, 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...
Prevent wrapping of menu items === I created a horizontal navigation(menu) bar for my site. When i resize my window to a size smaller than that of the bar, the menu items get wrapped.I want that the menu should remain intact(that is, it shud remain horizontal) irrespective of the size of window as it usually can be seen in sites such as Google. I tried various ways posted on various forums including this one but nothing worked for me. Below I have pasted my CSS code for the menu.Please help me..! CSS CODE: #cssmenu ul { margin: 0; padding: 0;} #cssmenu li { margin: 0; padding: 0;} #cssmenu a { margin: 0; padding: 0;} #cssmenu ul {list-style: none;} #cssmenu a {text-decoration: none;} #cssmenu {height: 70px; background-color: #6699CC; box-shadow: 0px 2px 3px rgba(0,0,0,.4); } #cssmenu > ul > li { float: left; margin-left: 30px; position: relative; } #cssmenu > ul > li > a { color: #FFFFFF; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 18px; line-height: 70px; padding: 15px 20px; -webkit-transition: color .15s; -moz-transition: color .15s; -o-transition: color .15s; transition: color .15s; } #cssmenu > ul > li > a:hover {color: #00FF00; } body.home li.home, body.tech li.tech {font-weight:bold; } #cssmenu > ul > li > ul { opacity: 0; visibility: hidden; padding: 16px 0 20px 0; background-color: #FFFFFF; text-align: left; position: absolute; top: 55px; left: 50%; margin-left: -90px; width: 180px; -webkit-transition: all .3s .1s; -moz-transition: all .3s .1s; -o-transition: all .3s .1s; transition: all .3s .1s; -webkit-border-radius: 5px; -moz-border-radius: 5px; border-radius: 5px; -webkit-box-shadow: 0px 1px 3px rgba(0,0,0,.4); -moz-box-shadow: 0px 1px 3px rgba(0,0,0,.4); box-shadow: 0px 1px 3px rgba(0,0,0,.4); } #cssmenu > ul > li:hover > ul { opacity: 1; top: 65px; visibility: visible; } #cssmenu > ul > li > ul:before{ content: ''; display: block; border-color: transparent transparent rgb(250,250,250) transparent; border-style: solid; border-width: 10px; position: absolute; top: -20px; left: 50%; margin-left: -10px; } #cssmenu > ul ul > li { position: relative;} #cssmenu ul ul a{ color: rgb(50,50,50); font-family: Verdana, 'Lucida Grande'; font-size: 13px; background-color: rgb(250,250,250); padding: 5px 8px 7px 16px; display: block; -webkit-transition: background-color .1s; -moz-transition: background-color .1s; -o-transition: background-color .1s; transition: background-color .1s; } #cssmenu ul ul a:hover {background-color: rgb(240,240,240);} #cssmenu ul ul ul { visibility: hidden; opacity: 0; position: absolute; top: -16px; left: 206px; padding: 16px 0 20px 0; background-color: rgb(250,250,250); text-align: left; width: 160px; -webkit-transition: all .3s; -moz-transition: all .3s; -o-transition: all .3s; transition: all .3s; -webkit-border-radius: 5px; -moz-border-radius: 5px; border-radius: 5px; -webkit-box-shadow: 0px 1px 3px rgba(0,0,0,.4); -moz-box-shadow: 0px 1px 3px rgba(0,0,0,.4); box-shadow: 0px 1px 3px rgba(0,0,0,.4); } #cssmenu ul ul > li:hover > ul { opacity: 1; left: 196px; visibility: visible;} #cssmenu ul ul a:hover{ background-color: rgb(205,44,36); color: rgb(240,240,240); } [1]: http://i.stack.imgur.com/vr1YB.jpg
0
[ 2, 2501, 13437, 16, 11379, 3755, 800, 3726, 3726, 31, 679, 21, 10095, 8368, 5, 755, 291, 6, 748, 26, 51, 689, 9, 76, 31, 302, 10454, 51, 1463, 20, 21, 1072, 2012, 119, 30, 16, 14, 748, 15, 14, 11379, 3755, 164, 3684, 9, 49, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Simple server/client chat === I'm about to start small project for a simple server/client chat in Java from scratch. However I'm really a beginner here I just want to test my basic knowledge in threads and to extend it with real project. So if anybody is experienced in this I appreciate if you mark down the tasks I have to take care of. What should be implemented in Server side and Client side. A list of necessary and required implementations I have to take care of would be great. 10x for your kind help
0
[ 2, 1935, 8128, 118, 150, 18513, 38, 6615, 800, 3726, 3726, 31, 22, 79, 88, 20, 799, 284, 669, 26, 21, 1935, 8128, 118, 150, 18513, 38, 6615, 19, 8247, 37, 12395, 9, 207, 31, 22, 79, 510, 21, 26931, 235, 31, 114, 259, 20, 1289,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Print pdf from browser which generated with Mozilla Pdf Js === i recently using [Pdf JS][1] to view pdf, is there a way to print all document with this script, or there are another way printing these document. actually we could use `window.print` javascript , but in Pdf JS i view my pdf page by page. [1]: https://github.com/mozilla/pdf.js
0
[ 2, 4793, 13, 11124, 37, 16495, 56, 6756, 29, 13, 18057, 3247, 13, 11124, 487, 18, 800, 3726, 3726, 31, 1989, 568, 636, 11124, 487, 18, 500, 2558, 165, 500, 20, 1418, 13, 11124, 15, 25, 80, 21, 161, 20, 4793, 65, 4492, 29, 48, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 save image along with surface view in android? === Surface along with image when i click on button it's save only the surface for this i tried following code camera.takePicture(shutterCallback, rawCallback, jpegCallback); ShutterCallback shutterCallback = new ShutterCallback() { public void onShutter() { Log.d(TAG, "onShutter'd"); } }; PictureCallback rawCallback = new PictureCallback() { public void onPictureTaken(byte[] data, Camera camera) { Log.d(TAG, "onPictureTaken - raw"); } }; PictureCallback jpegCallback = new PictureCallback() { public void onPictureTaken(byte[] data, Camera camera) { try { File root = new File(Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DCIM),"Camera"); if (!root.exists()) { root.mkdirs(); } FileOutputStream f = new FileOutputStream(new File(root,System.currentTimeMillis()+".jpg")); int len1 = data.length; f.write(data,0, len1); f.close(); } catch (Exception e) { e.printStackTrace(); } finally { } } }; by this code getting only surface, is there any possible to save surface along with image ? if any one knows please help me
0
[ 2, 184, 20, 2079, 1961, 303, 29, 1490, 1418, 19, 13005, 60, 800, 3726, 3726, 1490, 303, 29, 1961, 76, 31, 10840, 27, 5167, 32, 22, 18, 2079, 104, 14, 1490, 26, 48, 31, 794, 249, 1797, 3336, 9, 4386, 25602, 5, 15640, 815, 9200, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 place dynamically created buttons in rows on a layout? === I'm trying to add 24 buttons with a for-loop. I'm trying to place four equally sized buttons per row and hoping to see the next group of four to appear below them. How can I achieve this? My not-working effort so far looks like this: public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); ScrollView sv = new ScrollView(this); LinearLayout layout = new LinearLayout(this); LinearLayout.LayoutParams params = new LinearLayout.LayoutParams (LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT); layout.setWeightSum(12.0f); params.weight = 3.0f; layout.setOrientation(LinearLayout.HORIZONTAL); sv.addView(layout); for (int i = 0; i < 24; i++) { Button btn = new Button(this); btn.setText("Button"); btn.setLayoutParams(params); layout.addView(btn); } this.setContentView(sv); } Any help appreciated.
0
[ 2, 184, 20, 209, 7782, 1326, 679, 12861, 19, 11295, 27, 21, 9106, 60, 800, 3726, 3726, 31, 22, 79, 749, 20, 3547, 937, 12861, 29, 21, 26, 8, 18786, 9, 31, 22, 79, 749, 20, 209, 222, 7634, 13, 6560, 12861, 416, 3131, 17, 3935, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Weird behaviour with fetchedResultsController in numberOfRowsInSection === My goal is populating a section of a tableview by filling data from all fetched results on a fetchedResultsController. This is very straighforward and works like a charm. The second part of my small app is adding a attribute "price" in another section of the same table. It works allright. This is I've used to achieve that: - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { return 2; } - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { // Return the number of rows in the section. if (section == 1) { return 1; } else return [self.fetchedResultsController.fetchedObjects count]; } - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { if (indexPath.section == 0) { static NSString *ci = @"CellTotal"; UITableViewCell *cell = (UITableViewCell *)[tableView dequeueReusableCellWithIdentifier:ci]; id <NSFetchedResultsSectionInfo> sectionInfo = [[self.fetchedResultsController sections] objectAtIndex:0]; float expense = 0; for (NSManagedObject *object in [sectionInfo objects]) { expense += [[object valueForKey:@"precio"] floatValue]; } cell.textLabel.text = [NSString stringWithFormat:@"%f", expense]; return cell; } else { static NSString *ci = @"Cell"; UITableViewCell *cell = (UITableViewCell *)[tableView dequeueReusableCellWithIdentifier:ci]; [self configureCell:cell atIndexPath:indexPath]; return cell; } } - (void)configureCell:(UITableViewCell *)cell atIndexPath:(NSIndexPath *)indexPath{ Gastos *g = (Gastos *)[self.fetchedResultsController objectAtIndexPath:indexPath]; cell.detailTextLabel.text = g.nombre; NSNumberFormatter * f = [[NSNumberFormatter alloc] init]; [f setNumberStyle:NSNumberFormatterDecimalStyle]; [f setMinimumFractionDigits:2]; [f setMaximumFractionDigits:2]; NSString *precio = [f stringFromNumber: g.precio]; cell.textLabel.text = precio; } The problem comes up when I wanted to change the order of the sections in the tableview. If I wanted to show the total addition in section 0, and the list of fetchedresults in section 1, then my app crashes with the error: > Terminating app due to uncaught exception 'NSRangeException', reason: > '*** -[__NSArrayM objectAtIndex:]: index 1 beyond bounds [0 .. 0]' Any ideas on what I'm doing wrong? any help is much appreciated, thanks!
0
[ 2, 5455, 7727, 29, 13, 28998, 29955, 18, 12898, 1252, 19, 234, 1041, 5417, 18, 108, 10579, 800, 3726, 3726, 51, 1195, 25, 1675, 10038, 21, 1050, 16, 21, 859, 4725, 34, 7702, 1054, 37, 65, 13, 28998, 1736, 27, 21, 13, 28998, 29955,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
phonegap.js and jq.ui.min.js together === i am trying to make an app in phoneGap XDK from appmobi and i want to make my camera from phonegap library (phonegap.js) and all the other things (buttons etc) in the app i want to do them by using the jq.ui.min.js library.In the simulator i haven't problem but in a android mobile it doesn't work.I want to know if i can use these two libraries together in phoneGap XDK program and if yes how i can make it to work in android phone. any help it would be very important to me. thanks you in my html file i want to have these libraries: "http://localhost:58888/_appMobi/appmobi.js" "http://localhost:58888/_appMobi/xhr.js" "http://localhost:58888/_appMobi/phonegap.js" jq.ui.min.js all.js js/jq.web.min.js
0
[ 2, 1132, 1136, 306, 9, 728, 18, 17, 487, 1251, 9, 5661, 9, 2160, 9, 728, 18, 429, 800, 3726, 3726, 31, 589, 749, 20, 233, 40, 4865, 19, 1132, 1136, 306, 993, 43, 197, 37, 4865, 79, 14398, 17, 31, 259, 20, 233, 51, 3336, 37, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How to export revision on commit with a post-commit hook? === It may be handy to export the specific Subversion repository branch after a commit, using a post-commit hook. E.g. to **update a website after a commit** or to update a development branch for testing. Is there any instruction or sample of such a hook?
0
[ 2, 184, 20, 7487, 11323, 27, 9686, 29, 21, 678, 8, 960, 5130, 5559, 60, 800, 3726, 3726, 32, 123, 44, 20277, 20, 7487, 14, 1903, 972, 10898, 24869, 1686, 75, 21, 9686, 15, 568, 21, 678, 8, 960, 5130, 5559, 9, 13, 62, 9, 263, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
software capacitor === I need to use a software capacitor. I have a signal with n samples. and i need to filter it. Is there a c++ library(or a single function) that contains a software capacitor and other electric components. or is there a way to find an algorithm to filter the signal as a capacitor ?
2
[ 2, 2306, 13, 24563, 800, 3726, 3726, 31, 376, 20, 275, 21, 2306, 13, 24563, 9, 31, 57, 21, 2800, 29, 13, 103, 7855, 9, 17, 31, 376, 20, 11945, 32, 9, 25, 80, 21, 272, 20512, 1248, 5, 248, 21, 345, 1990, 6, 30, 1588, 21, 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...
input type password value? === hello i have a problem with the following issue: i have two input fields. one is for the login username i.e. and the other one is the password. now i would like to set the value of both fields. my problem is the password. my intend to realize that is the following: HTML: <input type="text" id="log_password" name="log_password" value="<?php echo ($log_password);?>" onfocus="if(this.value=='Password')this.value='';this.type='password'" onblur="if(this.value=='') this.value=this.defaultValue;"/> PHP: $log_password = "Password"; if(isset($_POST['submit'])){ $log_password = $_POST['log_password']; if(empty($log_password)){ $errors['log_password'][]="No password given"; $_POST['log_password'] = "Password"; $log_password = $_POST['log_password']; } } the problem is that this works up to the point where the form will be submitted. in case of an error the password is visible again because of the `type="text"` tag. so how can i solve this, if there is someone who could help me out i really would appreciate. thanks a lot.
0
[ 2, 6367, 1001, 20884, 1923, 60, 800, 3726, 3726, 10975, 31, 57, 21, 1448, 29, 14, 249, 1513, 45, 31, 57, 81, 6367, 2861, 9, 53, 25, 26, 14, 6738, 108, 4155, 7259, 31, 9, 62, 9, 17, 14, 89, 53, 25, 14, 20884, 9, 130, 31, 83...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Do I postback the whole array or just an element of the array when using AJAX? === I've not worked with AJAX outside of (AJAX Control Toolkit) for Webforms. So forgive my ignorance. But now that I'm working with MVC 3 and JQuery, I'd like to know what is the way to handle this issue. Basically, my page will GET a `List<ViewModel>`. But when I postback, do I postback the whole `List<ViewModel>` or just the one element that needs updating? What's the normal way to handle this? For now, just assume my ViewModel is: public class activePlayer { public int UserID {get; set;}; public string LastName {get; set;}; public string FirstName {get; set;}; public string Class {get; set;}; public int XP {get; set;}; public string activeWeapon {get; set;}; }
0
[ 2, 107, 31, 678, 1958, 14, 979, 7718, 54, 114, 40, 4520, 16, 14, 7718, 76, 568, 20624, 60, 800, 3726, 3726, 31, 22, 195, 52, 577, 29, 20624, 719, 16, 13, 5, 6881, 7522, 569, 5607, 13703, 6, 26, 2741, 4190, 18, 9, 86, 8591, 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...
JavaScript Request/Operation Framework or Toolkit? === I'm building a complex application in JavaScript which needs to make several requests to the server. Sometimes that request cannot be completed as sent, and addition information is needed. I would like the ability to have the server inform the application in the request's response that more information is needed and to describe how to retrieve that information. For example, say a user tries to perform an operation that his current permissions level does not allow. The server needs to ask the application for an override authorization code, basically meaning the application needs to pop up with a dialog asking for an admin passcode. I'd like to have some kind of framework that abstracts all this. Possible a main "Request" or "Operation" class, which I can define sub-Request classes that define possible interpretations of requests. I'm not sure if something like this exists already or not. So I guess my questions are: 1) Does a framework like this exists? and 2) Are there any articles on this topic (platform and language agnostic, I can learn how they work from any source). I know frameworks like Dojo and ExtJS use something like it for their data stores, but I'm not sure if it's exactly what i'm needing, or how it even works for that matter. Any help leading me in the right direction is appreciated, Thank You.
0
[ 2, 8247, 8741, 3772, 118, 11377, 6596, 54, 5607, 13703, 60, 800, 3726, 3726, 31, 22, 79, 353, 21, 1502, 3010, 19, 8247, 8741, 56, 2274, 20, 233, 238, 12279, 20, 14, 8128, 9, 1030, 30, 3772, 1967, 44, 1066, 28, 795, 15, 17, 848, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
AutoCompleteTextView hints in landscape mode === I'm using AutoCompleteTextView in my app with a custom adapter and it works perfect in portrait mode. In horizontal mode however the software keyboard takes most of the screen and text view uses overlay buttons instead of Views provided by the adapter. I couldn't find a clear documentation about how this works behind the scenes. It seems that in landscape mode AutoCompleteTextView bypasses adapter's getView() method, does some dirty work using getItem() and renders items itself using raw strings. To make things worse it seems that in AutoCompleteTextView is accualy presenting TWO lists of autocompletion hints: standard dropdown AND overlay buttons in the same time (this is well visible if we set imeOptions to flagNoExtractUi to prevent AutoCompleteTextView expanding in landscape). I'd like to supply my own Views in BOTH situations - but I managed to do it only for the drop down menu so far. Any changes to provide custom views for overlayed list? I'm sorry but I can't post images due to low ranking yet. I can send them if anyone needs them.
0
[ 2, 3108, 15990, 11969, 4725, 6382, 18, 19, 4453, 3740, 800, 3726, 3726, 31, 22, 79, 568, 3108, 15990, 11969, 4725, 19, 51, 4865, 29, 21, 5816, 9924, 106, 17, 32, 693, 2107, 19, 5548, 3740, 9, 19, 10095, 3740, 207, 14, 2306, 8896, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Best practice for creating many UIColors? === I have a table view with hundreds of custom drawn UITableViewCells which are drawn using the `drawRect:` method. These cells all share the same color styles. So, in each `drawRect:`, I do something like this: -(void)drawRect:(CGRect)rect { UIColor *bgColor = [UIColor colorWithWhite:0.9 alpha:1.0]; UIColor *textColor = [UIColor colorWithWhite:0.98 alpha:1.0]; UIColor *strokeColor = [UIColor colorWithWhite:0.6 alpha:1.0]; /* use colors */ } And so as you're scrolling down the table, this gets called hundreds of times. I'm not really sure if what I'm doing is efficient though. Is there a better way to create these colors, maybe with some reusability? Should I cache these colors in some global variable? Is what I am doing expensive or negligible?
0
[ 2, 246, 1345, 26, 2936, 151, 13, 5661, 11282, 18, 60, 800, 3726, 3726, 31, 57, 21, 859, 1418, 29, 4541, 16, 5816, 3160, 13, 11193, 579, 4725, 9725, 18, 56, 50, 3160, 568, 14, 13, 1, 3030, 7127, 11557, 45, 1, 2109, 9, 158, 2934...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
SQL: select three rows for each distinct value === For each distinct Name, I want to select the first three rows with the earliest time_stamp (or smallest number in UNIXTIME). What is the correct query? Start Table: Name Log-in Time -------- ----------------- Don 05:30:00 Don 05:35:32 Don 07:12:43 Don 09:52:23 Don 05:32:43 James 03:30:00 James 03:54:23 James 09:51:54 James 14:43:34 James 43:22:11 James 59:43:33 James 20:12:11 Mindy 05:32:22 Mindy 15:14:44 Caroline 10:02:22 Rebecca 20:43:32 End Table: Name Log-in Time -------- ----------------- Don 05:30:00 Don 05:35:32 Don 07:12:43 James 03:30:00 James 03:54:23 James 09:51:54 Mindy 05:32:22 Mindy 15:14:44 Caroline 10:02:22 Rebecca 20:43:32
0
[ 2, 4444, 255, 45, 5407, 132, 11295, 26, 206, 4421, 1923, 800, 3726, 3726, 26, 206, 4421, 204, 15, 31, 259, 20, 5407, 14, 64, 132, 11295, 29, 14, 4448, 85, 1, 384, 10158, 13, 5, 248, 11056, 234, 19, 22540, 891, 6, 9, 98, 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 do I attach and update an existing entity? === I want to construct a disconnected object on my web page: var entity = new MyEntity(); entity.ID = IdFromPage; entity.Name = UpdatedNameFromPage; Connect it to my object context and then call context.Save() but how do I do this? I dont want to have to use linq to extract the entity like this... var entityFromPage = new MyEntity(); entity.ID = IdFromPage; entity.Name = UpdatedNameFromPage; var connectedEntity = _db.MyEntities.Where(x => x.ID == IdFromPage).First(); connectedEntity.ID = entityFromPage.ID; connectedEntity.Name = entityFromPage.Name; Because the second part of this script may be massive and I dont want to have to re-map everything. I just want to slot it in on the ID and then call Save() is this possible?
0
[ 2, 184, 107, 31, 19514, 17, 11100, 40, 3149, 9252, 60, 800, 3726, 3726, 31, 259, 20, 6960, 21, 25730, 3095, 27, 51, 2741, 2478, 45, 4033, 9252, 800, 78, 51, 2291, 856, 5, 6, 73, 9252, 9, 1340, 800, 4924, 2665, 6486, 73, 9252, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 number of files in req Parameter, bodyParser, Express, NodeJS === Multiple files are being posted to nodejs application using Express and bodyParser. The number of files change in every request. It is required to get number of files posted at the server. I have tried using req.files.length but it gives undefined. How can I know the number of files posted in a post request? Also how to loop through each file?
0
[ 2, 164, 234, 16, 6488, 19, 302, 1251, 18906, 15, 358, 3574, 4104, 15, 2999, 15, 15421, 728, 18, 800, 3726, 3726, 1886, 6488, 50, 142, 6054, 20, 15421, 728, 18, 3010, 568, 2999, 17, 358, 3574, 4104, 9, 14, 234, 16, 6488, 753, 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...
JUnit RemoteTestRunner NoClassDefFoundError Junit4 Eclipse 3.7.2 === I am attemping to add JUnit tests to my existing Eclipse 3.7.2 project and it seems like JUnit is not properly added to the project. I have attempting adding the JUnit jar manually. I have tried several other run configuration modifications that all result in the same error. New projects that I create also exhibit this error when I add a JUnit test. java.lang.NoClassDefFoundError: org/eclipse/jdt/internal/junit/runner/RemoteTestRunner Caused by: java.lang.ClassNotFoundException: org.eclipse.jdt.internal.junit.runner.RemoteTestRunner at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) Exception in thread "main"
0
[ 2, 7446, 242, 5388, 10543, 12993, 90, 1898, 13862, 12235, 29992, 7446, 242, 300, 11652, 203, 9, 465, 9, 135, 800, 3726, 3726, 31, 589, 35, 9577, 68, 20, 3547, 7446, 242, 4894, 20, 51, 3149, 11652, 203, 9, 465, 9, 135, 669, 17, 3...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
'operator<<' not implemented in type 'ostream' for arguments of type 'const char *' === Hello I am getting the above error message from the following function: friend std::ostream & operator<<(std::ostream & Ostr, const RatioNeighbour & rn) { Ostr << "row: " << rn.row << " \tcol: " << rn.col << " \tdist: " << rn.dist; return Ostr; } This function is modelled after numerous examples on the web, like [this] example: inline std::ostream& operator<<(std::ostream& os, const Telegram& t) { os << "time: " << t.DispatchTime << " Sender: " << t.Sender << " Receiver: " << t.Receiver << " Msg: " << t.Msg; return os; } And is used like this: std::ofstream f("c:\\temp\\neighbours.txt"); for (vector<RatioNeighbour>::const_iterator i = NeighbourList.begin(); i != NeighbourList.end(); ++i) { f << *i <<"\n"; } The row and col fields of RatioNeighbour are int and dist is a double. I've been poking at this for hours, and can't imagine where I've gone wrong... Help! [this]: http://stackoverflow.com/questions/4801196/stdostream-need-help-with-function
0
[ 2, 13, 22, 9477, 3457, 1, 22, 52, 6807, 19, 1001, 13, 22, 111, 11260, 22, 26, 10553, 16, 1001, 13, 22, 12124, 38, 4892, 1637, 22, 800, 3726, 3726, 10975, 31, 589, 1017, 14, 784, 7019, 2802, 37, 14, 249, 1990, 45, 860, 354, 43,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
g++ (freebsd) error: expected primary-expression before '{' token === i have code that works fine in ubuntu with g++ but failed to compile in freebsd , i have no idea why //in the source body MyClass.cpp void MyClass::app_init() { funcs[0] = { &MyClass::app_map, 4 }; funcs[1] = { &MyClass::app_pro, 10 }; } //in the header MyClass.h public: struct foo { int fd; time_t ts; }; struct func { void (MyClass::*f) (foo *); int arg_length; }; void app_init(); void app_map(foo *a); void app_pro(foo *a); private: func funcs[FUNCS_ARRAY]; //2
0
[ 2, 489, 20512, 13, 5, 4639, 4562, 43, 6, 7019, 45, 1727, 1256, 8, 28993, 115, 13, 22, 1, 22, 20, 2853, 800, 3726, 3726, 31, 57, 1797, 30, 693, 1123, 19, 287, 12968, 2473, 29, 489, 20512, 47, 1702, 20, 26561, 19, 551, 4562, 43,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 a great segue but want to change it's trigger === In this post, I first state my problem then I state how I figured out to solve it. I want to know if this is the best or "correct" way to have solved it or if there is a more round about way that I overlooked. Thanks! 1.) I have a segue constructed that takes a UIButton touchUpInside and creates a subclass of UITableViewController with custom cells etc..... Also I like how it uses "Form Sheet" presentation on the iPad version. That looks great. I have all the code written to dismiss the table view as well. It turns out it would be a whole lot better to bring this tableview up from a double tap on one of my UIView and get rid of the UIButton that currently triggers the segue. Problem though, I don't see any way to do that with the storyboard IDE. I like the segues and don't want to mix nib loading into this app. 2.) My solution was to delete the UIButton (which also unfortunately deletes the segue). No problem, just re-create it but with the UIButton's parent viewcontroller as the source. Highlight the segue and give it an identifier. This is how we'll trigger the segue programmatically. Now in the double-tap detection I call: [self performSegueWithIdentifier:@"segue_MyTableViewController" sender:self];
0
[ 2, 31, 57, 21, 374, 1353, 3982, 47, 259, 20, 753, 32, 22, 18, 7286, 800, 3726, 3726, 19, 48, 678, 15, 31, 64, 146, 51, 1448, 94, 31, 146, 184, 31, 5700, 70, 20, 8402, 32, 9, 31, 259, 20, 143, 100, 48, 25, 14, 246, 54, 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...
Convert maven web module to google app engine project === <br/> I'm new to the google cloud. I have a maven web project (actually its a maven module under a parent project) and i want to deploy it to the google cloud. the web application is quite independent, dependencies wise. it can be deployed on any web server or application server. i use mysql as my DB. it uses spring mvc and uses hibernate as JPA provider (using spring orm) and all these dependencies are provided and compiled in the war file. so...<br/> 1) is it possible to just deploy the war file to the google cloud without converting the project to a google app engine project?<br/> 2) if not, is there any way to convert my existing project to a google app engine project and still use maven?<br/> 3) maybe a noob question but, can i use mysql on the google cloud? i may have more questions as i go along but for now i guess this will do. Thanks
0
[ 2, 8406, 1216, 3124, 2741, 12613, 20, 8144, 4865, 1406, 669, 800, 3726, 3726, 13, 1, 5145, 118, 1, 31, 22, 79, 78, 20, 14, 8144, 4005, 9, 31, 57, 21, 1216, 3124, 2741, 669, 13, 5, 15661, 82, 21, 1216, 3124, 12613, 131, 21, 476...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
AWS java web server === I am trying to build a java server using AWS on an EC2 server on tomact. Why i am building is for a game i am making in unity. This will not be a real time game where I need a constant connection between clients. That being said I have a rough idea of what I think i need. What I have: I have installed ecplise with the aws sdk and that is about it. What I think i need: I a REST style server so I can make http calls. I have been told this is very simple to do because the data i need to transfer wont be needed to make in real time just pull when i need it to be pulled by the client. I have also seen stuff about jersey api and stuff but I am not sure I need that. Can someone point me in some good direction of tutorials, I have looked but I am still lost on what I need to be doing exactly. I essentially need a java server to run on a AWS tomact server and make http calls between an iphone client and a server. Thanks a lot!
0
[ 2, 21, 10268, 8247, 2741, 8128, 800, 3726, 3726, 31, 589, 749, 20, 1895, 21, 8247, 8128, 568, 21, 10268, 27, 40, 6695, 135, 8128, 27, 2067, 5183, 9, 483, 31, 589, 353, 25, 26, 21, 250, 31, 589, 544, 19, 8385, 9, 48, 129, 52, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
iCloud + Core Data - When to know to seed the iCloud core data store? === I am working to implement iCloud core data sync in my iPhone app. I am working on the user workflow, and the problem that I am encountering is trying to figure out when my app should "seed" the data to iCloud. This can happen under two use cases: (1) When the app is first installed and I want to seed with some pre-loaded data, or (2) if a pre-existing customer downloads the iCloud update, and their existing data should be uploaded to the iCloud. In each of these cases, I will have a "seed store" in the application which I will read from and upload the data to iCloud. The problem is, how do I know if the data has already been seeded? One option is to *delete the seed store* from the device once seeding is completed, so that the next time the app launches, it will know that it does not need to seed again. But, what if the store was already seeded from a different device? Is there some sort of flag I can check in iCloud which will tell me that the data should not be seeded? Or, am I forced to *always* seed the data when the local seed store is extant, and then de-dupe? That will cause problems because the initial seed data (from the app's initial launch after installation) is user-deletable, and so if they (1) install the app on their iPhone, and then delete the default data set, and then (2) install the app on their iPad, then the default data set will be re-uploaded *again*. Another option that just occurred to me is that when the user installs the app, or turns on iCloud, I could ask the user: Have you already uploaded data? Do you want to replace any data in iCloud with the local data? And if they say yes, then it will nuke iCloud's data store and then re-seed with local data. The problem with this, however, is that it creates the possibility of user error—and this is something that I don't want users to screw up. Any thoughts?
2
[ 2, 31, 19174, 2754, 2884, 1054, 13, 8, 76, 20, 143, 20, 5134, 14, 31, 19174, 2884, 1054, 1718, 60, 800, 3726, 3726, 31, 589, 638, 20, 8713, 31, 19174, 2884, 1054, 6063, 150, 19, 51, 21024, 4865, 9, 31, 589, 638, 27, 14, 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...
Simplest/fastes way of ordering mysql output in php === I am pulling data from database to show it with PHP in table. How to show this data descending from x-level from highest to lowest? (example output of code given below is: http://i45.tinypic.com/331ipv6.png) function check() { $function_Query="SELECT user, stone, iron, gold, diamond FROM xraydeath WHERE (diamond/(stone+iron+gold)) >= 0.03"; $function_Ask = mysql_query($function_Query) or die(mysql_error()); echo '<table cellpadding="5"> <tr align="center"> <td><strong>user</strong></td> <td><strong>x-level</strong></td> <td><strong>stone</strong></td> <td><strong>iron</strong></td> <td><strong>gold</strong></td> <td><strong>diamond</strong></td> </tr>'; while($function_Result = mysql_fetch_array($function_Ask)){ $user = $function_Result['user']; $stone = $function_Result['stone']; $iron = $function_Result['iron']; $gold = $function_Result['gold']; $diamond = $function_Result['diamond']; $level = round(($diamond / ($stone + $iron + $gold)), 4) * 100; echo '<tr>'; echo '<td>' . $user . '</td> <td>' . $level . '</td> <td>' . $stone . '</td> <td>' . $iron . '</td> <td>' . $gold . '</td> <td>' . $diamond . '</td>'; echo '</tr>'; } echo '</tr></table>'; } check();
0
[ 2, 24384, 118, 13088, 160, 161, 16, 15775, 51, 18, 22402, 5196, 19, 13, 26120, 800, 3726, 3726, 31, 589, 3303, 1054, 37, 6018, 20, 298, 32, 29, 13, 26120, 19, 859, 9, 184, 20, 298, 48, 1054, 16526, 37, 993, 8, 3906, 37, 1554, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Getting a text of Outer DIV using Jquery === I have Outer DIVS like this. <Input id ="SaveMe" value="Click" type="submit" > </Input> <DIV id="DivOne"> <DIV >First Content <DIV>X </DIV> </DIV> <DIV>Second Content <DIV>X </DIV> </DIV> </DIV> I would like to loop through outer DIVs and get the text.I am using the JQuery Code. $("#SaveMe").click(function() { $("#DivOne").children().each(function(index, elem) { alert($(elem).text()); }); }); But it shows First Content X ,Second Content X. I was hoping the "each loop" will loop through the outer DIV first and then the inner DIVs.How can i ignore looping through the inner DIVs (the DIVs with content X). http://jsfiddle.net/VVGRc/1/ Thanks !
0
[ 2, 1017, 21, 1854, 16, 4896, 13, 12916, 568, 487, 8190, 93, 800, 3726, 3726, 31, 57, 4896, 13, 12916, 18, 101, 48, 9, 13, 1, 108, 4881, 4924, 800, 7, 19863, 790, 7, 1923, 3726, 7, 150, 10129, 7, 1001, 3726, 7, 7563, 5130, 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...
Modal dialogs for exceptions on mobile apps - is there an anti-pattern? Too much blocking. Alternative? === Is there a best practice anti-pattern for modal dialogs on mobile web apps? It's a real show stopper. Android preferred. What's a better code pattern? Inline message, but how?
1
[ 2, 13, 20756, 28223, 18, 26, 13392, 27, 3241, 4865, 18, 13, 8, 25, 80, 40, 1082, 8, 5972, 8766, 60, 266, 212, 11828, 9, 2676, 60, 800, 3726, 3726, 25, 80, 21, 246, 1345, 1082, 8, 5972, 8766, 26, 13, 20756, 28223, 18, 27, 3241,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How to find the differences between two Array Lists based on a property? === I have two array list. Each has list of Objects of type Employee. The Employee class looks like below public class Employee { Employee(String firstname, String lastname, String employeeId) { this.firstname = firstname; this.lastname = lastname; this.employeeId = employeeId; } private int id; // this is the primary key from employee table private String firstname; private String lastname; private String employeeId; // manually assigned unique id to each employee // getters and setters } I need to find the differences between the two lists based on a property of the employee object which is employee id. Employee id is manually generated unique id given to each employee. import java.util.ArrayList; import java.util.List; public class FindDifferences { public static void main(String args[]){ List<Employee> list1 = new ArrayList<Employee>(); List<Employee> list2 = new ArrayList<Employee>(); list1.add(new Employee("F1", "L1", "EMP01")); list1.add(new Employee("F2", "L2", "EMP02")); list1.add(new Employee("F3", "L3", "EMP03")); list1.add(new Employee("F4", "L4", "EMP04")); list1.add(new Employee("F5", "L5", "EMP05")); list2.add(new Employee("F1", "L1", "EMP01")); list2.add(new Employee("F2", "L2", "EMP02")); list2.add(new Employee("F6", "L6", "EMP06")); list2.add(new Employee("F7", "L7", "EMP07")); list2.add(new Employee("F8", "L8", "EMP08")); List<Employee> notPresentInList1 = new ArrayList<Employee>(); // this list should contain EMP06, EMP07 and EMP08 List<Employee> notPresentInList2= new ArrayList<Employee>(); // this list should contain EMP03, EMP04 and EMP05 } } Please help.
0
[ 2, 184, 20, 477, 14, 4921, 128, 81, 7718, 7227, 432, 27, 21, 1354, 60, 800, 3726, 3726, 31, 57, 81, 7718, 968, 9, 206, 63, 968, 16, 3916, 16, 1001, 7362, 9, 14, 7362, 718, 1879, 101, 1021, 317, 718, 7362, 13, 1, 7362, 5, 111...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 value from multiple TextBox elements === I have a few different TextBox elements named as followed "e0", "e1", "e2", "e3". I know how many there are and I just want to be able to loop through them and grab their values rather than typing each one out manually. I'm assuming I'll be doing something like this, I just don't know how to access the element. for(int i= 0; i < 4; ++i) { string name = "e" + i; // How do I use my newly formed textbox name to access the textbox // element in winforms? }
0
[ 2, 164, 1923, 37, 1886, 1854, 5309, 2065, 800, 3726, 3726, 31, 57, 21, 310, 421, 1854, 5309, 2065, 377, 28, 709, 13, 7, 62, 387, 7, 15, 13, 7, 62, 165, 7, 15, 13, 7, 62, 135, 7, 15, 13, 7, 62, 240, 7, 9, 31, 143, 184, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
how to create winsnmp service as windows client which will get snmp trap from server using c? === I need to run windows service using WINsnmp and get snmp trap from server which is running in other system. can you help me to how to get this trap from Winsnmp servers and manipulate the data and also please share me the code that help me get more ideas about Winsnmp client service and how to get trap from server.
0
[ 2, 184, 20, 1600, 4041, 103, 2554, 365, 28, 1936, 6819, 56, 129, 164, 8912, 2554, 5585, 37, 8128, 568, 272, 60, 800, 3726, 3726, 31, 376, 20, 485, 1936, 365, 568, 4041, 103, 2554, 17, 164, 8912, 2554, 5585, 37, 8128, 56, 25, 946...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Coded UI Test to select newest folder === I'm writing a coded ui test that is to act on a folder created every night. The way I want it to work is that the test will choose the newest folder. How would I do this? Assertions?
0
[ 2, 13, 22254, 13, 5661, 1289, 20, 5407, 17175, 19294, 800, 3726, 3726, 31, 22, 79, 1174, 21, 13, 22254, 13, 5661, 1289, 30, 25, 20, 601, 27, 21, 19294, 679, 352, 343, 9, 14, 161, 31, 259, 32, 20, 170, 25, 30, 14, 1289, 129, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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...
SkypeKit SDK nullpointerexception === I am trying to implement a skype chat bot in scala, using the the skypekit sdk, and I am getting a null pointer exception at a part in the code which doesn't make sense to me: [error] (run-main) java.lang.NullPointerException java.lang.NullPointerException - at com.skype.ipc.SidRoot.sidDoRequest(SidRoot.java:271) - at com.skype.api.Skype.start(Skype.java:628) - at com.skypebot.SkypeSession.createSession(SkypeSession.scala:33) - at com.skypebot.SkypeBotEngine.run(SkypeBotEngine.scala:12) - at com.skypebot.SkypeBot$.main(SkypeBot.scala:33) - at com.skypebot.SkypeBot.main(SkypeBot.scala) - at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) - at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) - at java.lang.reflect.Method.invoke(Unknown Source) the lines that its faulting on are: SkypeSession.scala: listener.registerAllListeners skype.init(clientConfig,listener) println("here") skype.start() Skype.java private final static byte[] start_req = {(byte) 90,(byte) 82,(byte) 0,(byte) 145,(byte) 1}; public boolean start() { try { return sidDoRequest(start_req) .endRequest().getBoolParm(1, true); } catch(IOException e) { sidOnFatalError(e); return false ;} } and SidRoot.java protected Encoding sidDoRequest(byte[] request) throws IOException { mSidEncoderLock.lock(); mSidEncoding = true; return mSidEncoder.beginRequest(request, this); }
0
[ 2, 1661, 1664, 13703, 13, 18, 43, 197, 16203, 3132, 106, 10066, 872, 800, 3726, 3726, 31, 589, 749, 20, 8713, 21, 1661, 1664, 6615, 11012, 19, 25975, 15, 568, 14, 14, 1661, 1664, 13703, 13, 18, 43, 197, 15, 17, 31, 589, 1017, 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...
SQL Server - Deleting rows in a table a chunk at a time === I have a single-column table `Ids`, which whose column ID is of type `uniqueidentifier`. I have another table `MyTable` which has an ID column as well as many other columns. I would like to delete rows from `MyTable` 1000 at a time, where the ID from `MyTable` matches an ID in `Ids`. WHILE 1 = 1 BEGIN DELETE t FROM (SELECT TOP 1000 ID FROM Ids) d INNER JOIN MyTable t ON d.ID = t.ID; IF @@ROWCOUNT < 1 BREAK; WAITFOR DELAY @sleeptime; -- some time to be determined later END This doesn't seem to work though. What should the statement actually be?
0
[ 2, 4444, 255, 8128, 13, 8, 121, 1336, 68, 11295, 19, 21, 859, 21, 15009, 35, 21, 85, 800, 3726, 3726, 31, 57, 21, 345, 8, 716, 4404, 103, 859, 13, 1, 9178, 1, 15, 56, 1196, 4698, 4924, 25, 16, 1001, 13, 1, 1020, 5312, 13384,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
JavaEE project fail to deploy === I am beginner in Java EE. Today I tried to learn Java EE by following this tutorial: http://netbeans.org/kb/docs/javaee/javaee-gettingstarted.html It basically teaches how to create a Web Application from Java Web categories using Netbeans. When I run the application, I got the Build Failed error message like this: WebApplication1/build/web&name=WebApplication1&contextroot=/WebApplication1&force=true failed on GlassFish Server 3+ Error occurred during deployment: Exception while preparing the app : Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.3.2.v20111125-r10461): org.eclipse.persistence.exceptions.DatabaseException Internal Exception: java.sql.SQLException: Error in allocating a connection. Cause: Connection could not be allocated because: java.net.ConnectException : Error connecting to server localhost on port 1527 with message Connection refused. Error Code: 0. Please see server.log for more details. WebApplication1/nbproject/build-impl.xml:721: The module has not been deployed. See the server log for details. BUILD FAILED (total time: 2 seconds) I already turn glassfish server on and choose glassfish as the server when creating this project but it looks like the server denies connection.
0
[ 2, 8247, 2851, 669, 7476, 20, 17617, 800, 3726, 3726, 31, 589, 26931, 19, 8247, 13, 2851, 9, 786, 31, 794, 20, 2484, 8247, 13, 2851, 34, 249, 48, 29724, 45, 7775, 6903, 2328, 863, 5950, 9, 5583, 118, 18167, 118, 13799, 18, 118, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Where should user data be stored for a VS Extensions? === I'm creating a VS 2012 Plugin via a VSIX project. The user will have the ability to save some custom settings. Is there a preferred location to store this data so that during an update the data is not overwritten?
0
[ 2, 113, 378, 4155, 1054, 44, 8214, 26, 21, 4611, 17529, 60, 800, 3726, 3726, 31, 22, 79, 2936, 21, 4611, 563, 10922, 108, 1197, 21, 566, 6742, 669, 9, 14, 4155, 129, 57, 14, 2165, 20, 2079, 109, 5816, 12410, 9, 25, 80, 21, 598...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Eclipse debug into the sources generated at runtime === I have a project that generates the sources for the class, then compiles the sources into the bytecode (with Eclipse compiler if that makes the difference), then loads the newly created class with the custom classloader. The class is then used as the regular Java class. I use Eclipse, and I want to write the plugin for the debugger that will allow me to source-debug the generated code that is not physically present on disk. I need a hint, a starting point where to look for. A some sort of extension point that such plugin should use, or the name of the class in Eclipse Debugger that is responsible for locating sources for the bytecode. I am sorry, if the question is somewhat vague, but I need a starting point to start digging.
0
[ 2, 11652, 121, 16254, 77, 14, 2662, 6756, 35, 485, 891, 800, 3726, 3726, 31, 57, 21, 669, 30, 7920, 18, 14, 2662, 26, 14, 718, 15, 94, 26561, 18, 14, 2662, 77, 14, 34, 591, 9375, 13, 5, 1410, 11652, 21486, 100, 30, 1364, 14, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
How to install pre-built packages in FreeBSD 9 DVD? === Back to days of FreeBSD 8 and 7, at the end of installation process, the installer asks whether I want to install the pre-built packages in the installation DVD. Now I have FreeBSD 9 DVD for amd64, the installer never asks me to install the pre-built packages.Is there anyway I can install the pre-built packages during the installation process? btw I have the latest DVD image, it was downloaded yesterday.
0
[ 2, 184, 20, 16146, 782, 8, 8607, 16875, 19, 551, 4562, 43, 561, 3527, 60, 800, 3726, 3726, 97, 20, 509, 16, 551, 4562, 43, 469, 17, 453, 15, 35, 14, 241, 16, 7758, 953, 15, 14, 16146, 106, 3913, 1472, 31, 259, 20, 16146, 14, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Is there a way to partition entity framework EMDX's? === With a large model, it would be really useful to have multiple entity framework designer surfaces that address a particular domain (authetication, customFeature1, customFeature2, etc) and have those EDMX's reference entities in other EMDX's. Is there a way to work with a paradigm similar to what you get with SQL Management Studio diagrams?
0
[ 2, 25, 80, 21, 161, 20, 10711, 9252, 6596, 3579, 43, 396, 22, 18, 60, 800, 3726, 3726, 29, 21, 370, 1061, 15, 32, 83, 44, 510, 4811, 20, 57, 1886, 9252, 6596, 4742, 11569, 30, 3218, 21, 1498, 4603, 13, 5, 1346, 124, 1786, 857,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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 for BufferedReader.readLine() to not read a whole line when reading from a slow stream? === I'm experiencing a strange error with one of our systems that I am at a loss to explain. In our system the backend is generating a large TSV output file which we are then serving across HTTP using the following code: BufferedInputStream input = new BufferedInputStream(p.getInputStream(), (int)FileUtils.BYTES_PER_MEGABYTE * 16); OutputStream output = resp.getOutputStream(); byte[] buffer = new byte[(int) (FileUtils.BYTES_PER_KILOBYTE * 8)]; do { int read = input.read(buffer); if (read <= 0) break; output.write(buffer); } while (true); input.close(); output.close(); Then on the client side there is a TSV parser consuming the HTTP response but on very large inputs we start seeing strange artifacts where the parser will report a line as having the wrong number of items and the error message prints the line it will be parsing and that line will be a random chunk of data i.e. not an entire line of the data My first thought was that the TSV being generated was malformed but I've pretty much ruled this out by copying the file directly from the backend system and then running it through three independently written open source TSV parsers (including the one the client code is using) and all of them are capable of parsing the file fine when running on the local file. For reference the code for the TSV parser we're using is [here][1] This leads me to two possibilities: 1. The code I've shown for copying the file across HTTP is flawed in some way - in which case I'd love for someone to point out what dumb but non-obvious mistake I've made! 1. `BufferedReader.readLine()` which is being used by the consuming parser is not guaranteed to read whole lines? I'd wouldn't be entirely surprised if this is the case as I've been bitten by strange read behavior over slow network streams in .Net so wonder if a similar problem can apply in Java? Or is there some other explanation I've overlooked? [1]: http://svn.apache.org/viewvc/jena/trunk/jena-arq/src/main/java/com/hp/hpl/jena/sparql/resultset/TSVInputIterator.java?view=log
0
[ 2, 25, 32, 938, 26, 17497, 69, 10647, 106, 9, 10647, 1143, 5, 6, 20, 52, 1302, 21, 979, 293, 76, 1876, 37, 21, 2276, 3766, 60, 800, 3726, 3726, 31, 22, 79, 15138, 21, 2578, 7019, 29, 53, 16, 318, 1242, 30, 31, 589, 35, 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...
Where to put loading image while Isotope performs a filter? === Isotope can take a while to return stuff when asked to filter. So, I'd like to use a loading.gif while that's happening. I suspect some jQuery would do the trick but don't know where or what it should look like to do that. The Isotope is straightforward: var $container = $('#stream'); $container.imagesLoaded( function(){ $container.isotope({ itemSelector: '.stream-class', transformsEnabled: false, }); }); Then, I use simple buttons like those in the docs to trigger the filter: $('#filters a').click(function(){ var selector = $(this).attr('data-filter'); $container.isotope({ filter: selector }); return false; }); Thanks in advance for the help!
0
[ 2, 113, 20, 442, 12797, 1961, 133, 21288, 11563, 21, 11945, 60, 800, 3726, 3726, 21288, 92, 247, 21, 133, 20, 788, 3217, 76, 411, 20, 11945, 9, 86, 15, 31, 22, 43, 101, 20, 275, 21, 12797, 9, 263, 821, 133, 30, 22, 18, 4942, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Backbone.js Redirect to External Url === I am having trouble redirecting to an external url. I want to know how I can redirect to, for example, http://www.google.com from inside my router. I know I can use the routers .navigate function but that redirects to a different view. How would I go about redirecting to an external url. Each time I try I use: window.location = 'http://www.google.com'; But it complains because it is expecting a MIME type of document and the current MIME type is application/json. So how can i change the MIME type inside javascript?
0
[ 2, 24036, 9, 728, 18, 302, 14706, 20, 4886, 287, 6362, 800, 3726, 3726, 31, 589, 452, 2572, 302, 14706, 68, 20, 40, 4886, 287, 6362, 9, 31, 259, 20, 143, 184, 31, 92, 302, 14706, 20, 15, 26, 823, 15, 7775, 6903, 6483, 9, 16111...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
matching patterns in app.yaml configuration, POST 404 error === Since main.app is the default page, regardless of an index.html page in the root directory (GAE does not work like cgi/apache, unfortunately), I've made the form page main.app, and the query/response page response.py. After submitting form, I get error: > Not found error: /response.py did not match any patterns in > application configuration. application: emot13 version: 1 runtime: python27 api_version: 1 threadsafe: true handlers: - url: /stylesheets/ static_dir: stylesheets - url: / script: main.app - url: /. script: response.app main.app: #!/usr/bin/env python import cgi import urllib from google.appengine.ext import db import webapp2 class MainPage(webapp2.RequestHandler): def get(self): self.response.out.write("""<html> <body> <head> <link type="text/css" rel="stylesheet" href="/stylesheets/main.css" /> </head> <body> <form action="/response.py" method="post"> #also tried "response.py", no difference <p>First Name: <input type="text" name="name"/></p> <p>How are things?</p> <p><input type="radio" name="mood" value="good">Good</p> <p><input type="radio" name="mood" value="bad">Bad</p> <p><input type="radio" name="mood" value="fair">Fair</p> <p><input type="submit" name="submit" value="Process"/></p> </form> </body></html>""") app = webapp2.WSGIApplication( [("/", MainPage)], debug=True) def main(): application.run() if __name__ == "__main__": main() response.py: #!/usr/bin/env python import cgi import time import datetime import urllib from google.appengine.ext import db import webapp2 #model class Visitor(db.Model): name = db.StringProperty(required=1) mood = db.StringProperty(choices=["good","bad","fair"]) date = db.DateTimeProperty(auto_now_add=True) class Response(webapp2.RequestHandler): def get(self): today = datetime.date.today() self.response.out.write("""<html><head> <link type="text/css" rel="stylesheet" href="/stylesheets/main.css" /> </head> <body> self.response.out.write(today.strftime(<html><body><p style='color:#3E3535'>%A, %d %B</p>) </body></html> """) localtime = time.localtime(time.time()) mon = localtime[1] # MONTH h = localtime[3] # HOUR name = self.request.get("name") name = name.capitalize() mood = self.request.get("mood") # variables and if/elif statements follow; they all work so that is not the problem. responses = db.GqlQuery("SELECT * " "FROM Visitor " "ORDER BY date DESC_LIMIT 1") for response in responses: if mood == "bad" and name != "": # responses follow; they all work so that is not the problem. class Process(webapp2.RequestHandler): def post(self): name = self.request.get("name") mood = self.request.get("mood") info = Visitor(name = name, mood = mood) info.put() self.redirect("/") app = webapp2.WSGIApplication( [("/", Response), ("/", Process)], debug=True) # tried uncommenting this as well v v #def response(): # application.run() #if __name__ == "__response__": # response() Help would be appreciated.
0
[ 2, 10120, 6282, 19, 4865, 9, 8580, 255, 8091, 15, 678, 13, 23397, 7019, 800, 3726, 3726, 179, 407, 9, 7753, 25, 14, 12838, 2478, 15, 7148, 16, 40, 4348, 9, 15895, 2478, 19, 14, 5900, 16755, 13, 5, 17721, 630, 52, 170, 101, 272, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
spring validation how do I get validation results? === code as follows: .... @RequestMapping( "/test") @ResponseBody public ResponseTO test( @Valid @RequestBody RequestTO to, HttpServletResponse resp) { //how do I get validation results here? return new ResponseTO("111"); } @InitBinder protected void initBinder(WebDataBinder binder) { binder.setValidator(new TestValidator()); } class TestValidator implements Validator { /** * This Validator validates just Person instances */ public boolean supports(Class clazz) { return RequestTO.class.equals(clazz); } public void validate(Object obj, Errors e) { ValidationUtils.rejectIfEmpty(e, "name", "name.empty"); RequestTO tx = (RequestTO) obj; if (tx.getName().equals("buy")) { e.rejectValue("feature", "NOT BUY"); } } } The part I could not figure out is how do I can get the validation results in the controller? Thanks!
0
[ 2, 1573, 27999, 184, 107, 31, 164, 27999, 1736, 60, 800, 3726, 3726, 1797, 28, 2415, 45, 13, 9, 9, 9, 9, 13, 1, 99, 10351, 540, 5574, 5, 13, 7, 118, 10543, 7, 6, 13, 1, 99, 18, 8782, 870, 9760, 317, 1627, 262, 1289, 5, 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...
iOS - Blank screen when device connected to mac - not when disconnected === I have developed an app that I want to work with iOS 3.1 so that it will work on my first generation iPod. However, if I click "run" in Xcode to run my app on the iPod, I just get a black screen appear. The strange thing is, if I disconnect the iPod from the computer and then launch the application again, it works fine. I can run it in the simulator and on my iPad 3 with no problems at all. Does anyone know why this might happen? Is it liable to work if I release it on the app store? I've littered the code with NSLogs to see if it's getting stuck somewhere, but it's not, it launches fine - it just seems to be that the first view isn't getting pushed onto my UINavigationController. The following is a snippet of code that I think is relevant. - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions (NSDictionary *)launchOptions { self.window = [[[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]] autorelease]; // Override point for customization after application launch. // self.viewController = [[[CPGViewController alloc] initWithNibName:@"CPGViewController" bundle:nil] autorelease]; self.navcon = [[UINavigationController alloc] init]; //self.navcon.navigationBarHidden = YES; CPGMainViewController *mvc = [[CPGMainViewController alloc] initWithNibName:@"CPGMainViewController" bundle:nil]; [self.navcon pushViewController:mvc animated:NO]; [mvc release]; //self.window.rootViewController = self.navcon; // Above doesn't work pre 4.0, do the following instead... [self.window addSubview: self.navcon.view]; [self.window makeKeyAndVisible]; // Set the background image here (set all views to have transparent background self.window.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"CNPGBackground.jpg"]]; return YES; } Thanks in advance.
0
[ 2, 13, 7760, 13, 8, 6463, 2324, 76, 3646, 2587, 20, 1572, 13, 8, 52, 76, 25730, 800, 3726, 3726, 31, 57, 885, 40, 4865, 30, 31, 259, 20, 170, 29, 13, 7760, 203, 9, 165, 86, 30, 32, 129, 170, 27, 51, 64, 2782, 31, 10670, 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 TabHost: update tabs from tab's activity === I have a TabActivity and am going to have 3 or 4 tabs. In TabA, I would like to have an ExpandableListView, which will list products. I would like TabC to act as a sort of "shopping cart", probably with a ListView of itself. So, my question is: is there a way to interact with the TabHost from the Activity? I would like to be able to click a button inside of TabA and have it update and switch to TabC. Is this possible? Can I get the Tab's activities call it's parents methods?
0
[ 2, 13005, 6523, 11694, 45, 11100, 6523, 18, 37, 6523, 22, 18, 2358, 800, 3726, 3726, 31, 57, 21, 6523, 19348, 17, 589, 228, 20, 57, 203, 54, 268, 6523, 18, 9, 19, 13, 21828, 15, 31, 83, 101, 20, 57, 40, 6073, 579, 5739, 4725, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Problem with MvcContrib === I want to use MvcContrib Grid helper, but i stuck on the problem - it's not working. I downloaded release for mvc 1, i have dll on my hard drive, i added a reference to my project, but i always getting following error: Error 1 'System.Web.Mvc.HtmlHelper' does not contain a definition for 'Grid' and no extension method 'Grid' accepting a first argument of type 'System.Web.Mvc.HtmlHelper' could be found (are you missing a using directive or an assembly reference?) I am using Visual Web Developer 2008 if this is important The question is: how correctly add this to my project? Can you give me step by step instruction? Thanks
0
[ 2, 1448, 29, 307, 8990, 1126, 38, 17980, 800, 3726, 3726, 31, 259, 20, 275, 307, 8990, 1126, 38, 17980, 7354, 448, 106, 15, 47, 31, 4549, 27, 14, 1448, 13, 8, 32, 22, 18, 52, 638, 9, 31, 23887, 830, 26, 307, 8990, 137, 15, 3...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Android TabWidget detect click on current tab === I am trying to find way to be able to fire an onclick event on a tab when this tab is the current tab. I did try this way (among several other) with no success thou. public void onTabChanged(String tabId) { Log.d(this.getClass().getName(), ">>>>>>>>>>>>>>>>>>>>>>>> tabId: " + tabId); int tabs = getTabWidget().getChildCount(); Log.d(this.getClass().getName(), "tabs: " + tabs); for(int i=0; i<tabs; i++){ View tab = getTabWidget().getChildAt(i); if(i==tabHost.getCurrentTab()){ Log.d(this.getClass().getName(), "tab: " + i); tab.setOnClickListener(this); }else{ tab.setOnClickListener(null); tab.getOnFocusChangeListener(); } } } the point is that I set the `onClickListener` to `null` so, the next time I click on a tab nothing happens, but I would like to have the *normal* tab behavior. Any idea there outside?
0
[ 2, 13005, 6523, 3976, 43, 3060, 9092, 10840, 27, 866, 6523, 800, 3726, 3726, 31, 589, 749, 20, 477, 161, 20, 44, 777, 20, 535, 40, 27, 150, 10129, 807, 27, 21, 6523, 76, 48, 6523, 25, 14, 866, 6523, 9, 31, 144, 1131, 48, 161, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
Getting files names, path name and version from VSS === I need to write a script to connect to a VSS project and then get the path name and all the file names and version number from it. Please guide.
0
[ 2, 1017, 6488, 1817, 15, 2013, 204, 17, 615, 37, 4611, 18, 800, 3726, 3726, 31, 376, 20, 2757, 21, 3884, 20, 6379, 20, 21, 4611, 18, 669, 17, 94, 164, 14, 2013, 204, 17, 65, 14, 3893, 1817, 17, 615, 234, 37, 32, 9, 2247, 337...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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...
How to center text in tabhost? === I have a basic question. In many tabhost examples, we find tabs with image and text. In my case, I would like to only display a text, but the issue is that my text is horizontally centered but not vertically (The text is at the bottom of my tab). I tried : android:layout_gravity="center" in the framelayout, but it doesn't work. Do you have any idea, please ? My xml. <TabHost xmlns:android="http://schemas.android.com/apk/res/android" android:id="@android:id/tabhost" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_gravity="center"> <LinearLayout android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_gravity="center"> <TabWidget android:id="@android:id/tabs" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_gravity="center"/> <FrameLayout android:id="@android:id/tabcontent" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_gravity="center"> </FrameLayout> </LinearLayout> </TabHost> Thank you
0
[ 2, 184, 20, 459, 1854, 19, 6523, 11694, 60, 800, 3726, 3726, 31, 57, 21, 2125, 1301, 9, 19, 151, 6523, 11694, 3770, 15, 95, 477, 6523, 18, 29, 1961, 17, 1854, 9, 19, 51, 610, 15, 31, 83, 101, 20, 104, 3042, 21, 1854, 15, 47,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
needed explanation for a c-program === In a c-book I bought, an exercise program is given as "what is the output for the following code snippet? printf(3+"Welcome"+2); " the answer I got is me (by executing it in TC++) But I can't get the actual mechanism. please explain me the actual mechanism behind it.
0
[ 2, 851, 5764, 26, 21, 272, 8, 19746, 800, 3726, 3726, 19, 21, 272, 8, 5199, 31, 2448, 15, 40, 5935, 625, 25, 504, 28, 13, 7, 608, 25, 14, 5196, 26, 14, 249, 1797, 13, 29061, 60, 4793, 410, 5, 240, 2430, 7, 16873, 7, 24259, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...