Posts

Showing posts from July, 2014

javascript - Web API Ajax calling not working -

here js code call custom web api method.. $.ajax({ url: '/api/adminapi/industrypost/?industryname='+addnewindustryname, type: 'post', cache: false, contenttype: 'application/json; charset=utf-8', success: function (response) { // response code. } }); this working fine in case using 'data' tag send data, not working. following. $.ajax({ url: '/api/adminapi/industrypost', type: 'post', cache: false, contenttype: 'application/json; charset=utf-8', data: { 'industryname': addnewindustryname }, success: function (response) { // response code. } }); webapiconfig config.maphttpattributeroutes(); config.routes.maphttproute( name: "defaultapi", routetemplate: "api/{controller}/{action}/{id}", defaults: new { id =...

g++ - gcc warnings: defined but not used vs unused variable -

whenever compile code observe following 2 warnings: warning: '<variable>' defined not used warning: unused variable '<variable>' i tried google did not find helpful thread or blog difference between these 2 warnings. example sample code snippet me or if duplicating existing thread please feel free refer. i think difference kind of subtle here code snippet along compiler output demonstrates differences: #include <iostream> static const char * hello = "hello"; void foo() { int i; std::cout << "foo" << std::endl; } ... argenet@martell ~ % g++ /tmp/def_not_used.cpp -wall /tmp/def_not_used.cpp: in function ‘void foo()’: /tmp/def_not_used.cpp:6:9: warning: unused variable ‘i’ [-wunused-variable] int i; ^ /tmp/def_not_used.cpp: @ global scope: /tmp/def_not_used.cpp:3:21: warning: ‘hello’ defined not used [-wunused-variable] static const char * hello = "hello"; so here l...

atlassian sourcetree - Atlasian Stash and svn Integration -

is there way integrate atlasian stash subversion. stash default used git. need integrate svn. please can 1 me out in understanding whether can integrate stash , svn? you can try svn mirror plugin stash. links git repository remote svn repository , keeps them in sync.

android - how to change spinner in TableLayout -

i created table layout, contains table rows. every table row contains linnear layour. linear layout has child spinner. when create table layout firstly writing each tablerow in arraylist<tablerow> list_rows . set different values spinners. when update activity table layout, function of redrawing table layout called, works correctly. problem after updating activity want change value of spinners , next update of table layout should show table new spinners, doesn't happen. public void addcolumninrows(tablerow tablerow, boolean name, boolean has_data, int number_of_student, int number_of_column) { // code spinner = new spinner(getcontext()); final string[] mark_5 = {"", "a", "i", "1", "2", "3", "4", "5"}; // elemets in spinner arrayadapter<string> adapter = new arrayadapter<string>(getcontext(), android.r.layout.simple_spinne...

Use powershell to retrieve all subsites for sharepoint online -

i'm trying write powershell script retrieve site collections, groups , subsites our sharepoint online tenancy. far i've been able sites, groups , users in each group. i'm having trouble getting subsites , identifying lists unique permissions (and retrieving permissions hopefully!) so far have lists: add-type –path "c:\program files\common files\microsoft shared\web server extensions\15\isapi\microsoft.sharepoint.client.dll" add-type –path "c:\program files\common files\microsoft shared\web server extensions\15\isapi\microsoft.sharepoint.client.runtime.dll" $password = read-host -prompt "enter password" -assecurestring $credentials = new-object microsoft.sharepoint.client.sharepointonlinecredentials("username", $password) $siteurl = "https://site/sites/test" $ctx = new-object microsoft.sharepoint.client.clientcontext($siteurl) $ctx.credentials = $credentials $web = $ctx.web $lists = $web.lists $ctx.load($lis...

java - How to read the SOAP raw rquest and response messages in axis2 webservices -

i using axis2 web-service client , want capture request , response raw xml. have created loghandler read response raw xml, don't know how configure loghandler file in axis2 webservice. please me how configure loghandler or tell me if there way request , response xml's. import org.apache.axis2.axisfault;`enter code here` import org.apache.axis2.context.messagecontext;`enter code here` import org.apache.axis2.engine.handler;`enter code here` import org.apache.axis2.handlers.abstracthandler;`enter code here` import org.apache.axis2.description.axisservice;`enter code here` import org.apache.log4j.logger;`enter code here` public class loghandler extends abstracthandler implements handler { private static logger logger = logger.getlogger(loghandler.class); private string name; public loghandler() { system.out.println(" & loghandler &&& constructor :"); } public string getname() { system.out .printl...

html - jQuery click event not working for p tag class -

this question has answer here: in jquery, how attach events dynamic html elements? [duplicate] 8 answers i generating output of options selected drop down list. want allow user 'remove' selections output. i can't code work though, here code renders output: $('#datacombo').change(function(){ $('#dataoutput').html(''); var values = $('#datacombo').val(); for(var = 0; < values.length; += 1) { $('#dataoutput').append(values[i] + '<p class="removeable">x</p>'+'<br/>') }}); so selected drop down item displayed on page 'x' next in p tags class "removable", generated. i've inspected in chrome , p tag created correct class. i added code remove clicked option doesnt work: $('.removeable').click(function(){ $('.removeable').re...

jquery - MVC 4 and dataTables: checkbox entry returns null ViewModel -

Image
what i'm trying first need display list of members need add group. user click on each checkbox each row of members user chooses. code running. problem is, when applied jquery.datatable (which renders too) doesn't seem return necessary data when of members hidden away (via next page or search). works fine when click show 100, showing every hidden data, of datatable. my viewmodel public class choosememberseditorviewmodel { public bool selected { get; set; } public string id { get; set; } public string name { get; set; } public string sex { get; set; } public string age { get; set; } public choosememberseditorviewmodel() { this.selected = false; this.id = ""; } } which inside viewmodel public class addmemberviewmodel { public list<group> group{ get; set; } public list<choosememberseditorviewmodel> lgmembers { get; set; } public addlifegroupmemberviewmodel() { this.group= new...

linux - What's the structure member 'pm' in the driver structure? -

what's 'pm' , 'of_match_table' in following spi driver code static struct platform_driver omap2_mcspi_driver = { .driver = { .name = "omap2_mcspi", .owner = this_module, .pm = &omap2_mcspi_pm_ops, .of_match_table = omap_mcspi_of_match, }, .probe = omap2_mcspi_probe, .remove = omap2_mcspi_remove, }; first, take on from platform device gets name . can find more details on acpi based device enumeration .

java - Log4j prevent EJB to be created on the glassfish -

i have created ejb project, , it's working fine, when add logger private transient static final logger log=logger.getlogger(myservicedao.class); for log4j error. error : caused by: javax.ejb.ejbexception: javax.ejb.createexception: not create stateless ejb. when remove line normal , works fine. the stacktrace: caused by: javax.ejb.ejbexception: javax.ejb.createexception: not create stateless ejb @ com.sun.ejb.containers.statelesssessioncontainer$sessioncontextfactory.create(statelesssessioncontainer.java:700) @ com.sun.ejb.containers.util.pool.nonblockingpool.getobject(nonblockingpool.java:246) @ com.sun.ejb.containers.statelesssessioncontainer._getcontext(statelesssessioncontainer.java:430) ... 72 more caused by: javax.ejb.createexception: not create stateless ejb @ com.sun.ejb.containers.statelesssessioncontainer.createstatelessejb(statelesssessioncontainer.java:514) @ com.sun.ejb.containers.statelesssessioncontainer.access$000(statelessses...

emacs - Minor Mode Mode-Line Menu -

how make entry in mode-line popup minor mode menu when clicked? for reference see discussion https://github.com/flycheck/flycheck/issues/365#issuecomment-38386558 it seems menu displayed on clicking mode-line entry mode same menu displayed when 1 clicks on mode's entry in menu-bar, provided mode defines top level menu entry. simplest way define top level menu so (easy-menu-define flycheck-menu flycheck-mode-map "flycheck menu" '("flycheck" ["check current buffer" flycheck-buffer t] ["clear errors in buffer" flycheck-clear t] ["compile current buffer" flycheck-compile t] "---" ["go next error" flycheck-next-error t] ["go previous error" flycheck-previous-error t] ["show errors" flycheck-list-errors t] ["google messages @ point" flycheck-google-messages t] "---" ["select syntax checker" flycheck-select...

axapta - What is the right way to access buttons in list page form? -

in ax 2012 in form template " list page " cannot access clicked method on button. not allowed overwrite method `clicked you can change behavior setting button property "displaytarget" value " client ". can change code of clicked method. not feel right. is there way how access clicked method better way? example using *formname*listpageinteraction linked in form properties? p.s.: know can make menu item (action) -> , call class. when not want open new form in new window (by using menu item [display]), want change on current form feels worse overwriting clicked method. setting displaytarget property value "client" hide button if used enterprise portal. if not plan use list page in ep go ahead. otherwise have put code in target form init or class main method.

visual studio - XsltListViewWebPart View BaseViewID -

i'm making sharepoint hosted app , created list several views. is possible show specific view on page ? like have view view baseviewid="2" , want show view in webpart. yes, it's possible achieve using module , provision xlstlistviewwebpart. in last blog post ( http://spsite.pro/blog/post/28/sharepoint-apps-for-public-site--xsltlistview-web-part-approach ) i've shared how anonymous users. can check code here - http://spsitepro.codeplex.com/ .

Single node, multiple MPI tasks -

i need debug mpi code have access single node/machine. problem bug looking arises when running on more node doesn't when running, example, 2 mpi tasks in same node, goes fine. assume mpi implementation (mviapich2) cleverly treats tasks running on same node by, example, replacing network communications ipc strategies or memcpy . so question is: how run 2 mpi tasks on single node making mpi treat them tasks on different nodes? possible? you can disable mvapich2 shared memory device setting mv2_use_shared_mem environment variable 0 : mpiexec ... -env mv2_use_shared_mem 0 ... ./executable make sure mvapich2 built tcp/ip device, otherwise ranks won't able communicate shared memory support turned off.

javascript - Convert integers to time and add -

i have requirement converting integer value time format using javascript. my requirement result should in time format. example 08:55 , 09:55 if add these 2 numbers 18.10 need 18:50 try this: ( my solution assumes sum of times not more 24 hours ) function pad(str) { return ("00"+str).slice(-2); } var str1 = "08:55"; var str2 = "09:55"; var token1 = str1.split(":"); var token2 = str2.split(":"); var result = token1[0] * 60 + + token1[1] + + token2[0] * 60 + + token2[1]; var newtime = pad(math.floor(result/60)) + ":" + pad(result % 60); console.log(newtime);

javascript - Issue with custom capitalize String method, jQuery and Select2 -

i getting trouble jquery , select2. i created function string prototype capitalize it. on other hand, using jquery 1.11.0 , select2 3.4.5 , when click on select2, got error because capitalize method called on non-string object: unable capitalize non-string value. <div id="select2-drop" class="select2-drop select2-display-none select2-with-searchbox select2-drop-auto-width" style="left: 813.5px; width: 380px; top: 777px; bottom: auto;"> printstacktrace.implementation.prototype.createexception@ http://my.domain.com/js/stacktrace.js:56 printstacktrace.implementation.prototype.run@ http://my.domain.com/js/stacktrace.js:43 printstacktrace@ http://my.domain.com/js/stacktrace.js:30 string.prototype.capitalize@ http://my.domain.com/js/orpheus.js:101 jquery.access@ http://my.domain.com/js/jquery.js:4122 jquery.access@ http://my.domain.com/js/jquery.js:4094 .css@ http://my.domain.com/js/jquery.js:6911 abstractselect2<...

php - Apache & MySQL aren't working on xampp control panel -

i installed xampp on pc can't start apache & mysql xampp control panel. error appears: error: apache shutdown unexpectedly. this may due blocked port, missing dependencies, improper privileges, crash, or shutdown method. press logs button view error logs , check windows event viewer more clues if need more help, copy , post entire log window on forums i tried solve it, , changed port nothing helped, error appears. here apache log error: [ssl:warn] [pid 4560:tid 704] ah01909: rsa certificate configured www.example.com:443 not include id matches server name [ssl:warn] [pid 4560:tid 704] ah01909: rsa certificate configured www.example.com:443 not include id matches server name [mpm_winnt:notice] [pid 4560:tid 704] ah00455: apache/2.4.7 (win32) openssl/1.0.1e php/5.5.9 configured -- resuming normal operations [mpm_winnt:notice] [pid 4560:tid 704] ah00456: apache lounge vc11 server built: nov 21 2013 20:13:01 [core:notice] [pid 4560:tid 704] ah00094: command line: ...

Ember.js: ObjectControllers not found -

Image
i think have in place. cannot use `needs: ['shipping', 'checkout'] in payment controller not found, see error: error while loading route: error: <appkit@controller:article/payment::ember1670> needs [ controller:checkout, controller:shipping ] not found the fun part is, have visited routes earlier because part of checkout process. take @ router: this.resource('articles', {path: '/product'}, function() { // fill articles navigation slider this.resource('article', {path: '/:article_id'}, function() { // article information slider // (...) // have active article, thats why shipping underneath 'article' this.route('shipping', {path: '/verzending'}); this.route('checkout', {path: '/betaalwijze'}); this.route('payment', {path: '/afrekenen'}); }); }); so visit: shipping checkout , payment...

java - Hibernate test does not finish -

i have java application connection mysql database via hibernate. i have written test testing connection database, never ends. 2 threads running, code i've written in test executed. 2 threads are: thread [pool-1-thread-1] (running) thread [destroyjavavm] (running) the following testfile: vote v1 = new vote(0, "abc"); vote v2 = new vote(1, "def"); candidate c1 = new candidate(0, "first candidate"); timestamp t = new timestamp(0, 123456l); entitymanager entmgr = entitymanagerutil.getentitymanagerfactory().createentitymanager(); entitytransaction transaction = entmgr.gettransaction(); transaction.begin(); voterepository vr = new voterepository(entmgr); entmgr.persist(v1); entmgr.persist(v2); candidaterepository cr = new candidaterepository(entmgr); entmgr.persist(c1); timestamprepository tr = new timestamprepository(entmgr); entmgr.persist(t); transaction.commit(); entmgr.close(); my persistence.xml looks this: <provider>or...

ios - Nothing apear in UIcollectionView Controller -

Image
i have uicollectionview in first view of application after uinavigationviewcontroller in storyboard : this rootviewcontroller.h #import <uikit/uikit.h> @interface rootviewcontroller : uicollectionviewcontroller<uicollectionviewdelegate,uicollectionviewdatasource> @property (nonatomic, strong) nsarray *entries; @end and rootviewcontroller.m : #import "rootviewcontroller.h" #import "apprecord.h" #import "cell.h" #define kcustomrowcount 7 @interface rootviewcontroller () <uicollectionviewdelegate,uicollectionviewdatasource,uicollectionviewdelegateflowlayout> // set of icondownloader objects each app @property (nonatomic, strong) nsmutabledictionary *imagedownloadsinprogress; @end @implementation rootviewcontroller #pragma mark // ------------------------------------------------------------------------------- // viewdidload // ------------------------------------------------------------------------------- - (void)vi...

get value from custominfowindow on android google maps v2? -

i implement tutorial show custominfowindow google maps v2 on android device here code in mainactivity.java final marker hamburg = googlemap.addmarker(new markeroptions().position(hamburg) .title("hamburg")); markers.put(hamburg.getid(), "http://img.india-forums.com/images/100x100/37525-a-still-image-of-akshay-kumar.jpg"); and code below class custom infowindow in same file private class custominfowindowadapter implements infowindowadapter{ private view view; public custominfowindowadapter() { view = getlayoutinflater().inflate(r.layout.custom_info_window, null); } @override public view getinfocontents(marker marker) { if (mapv2infowindow.this.marker != null && mapv2infowindow.this.marker.isinfowindowshown()) { mapv2infowindow.this.marker.hideinfowindow(); mapv2infowindow.this....

tree - Resizing zk-treecol at runtime -

i have application, should able re-size width of column of tree @ run time (as can re-size width of column in spreadsheet.) because don't want wrap data. feasible.. ? if yes how can achieve ? in advance. you can add : <treecols sizable="true"> here fiddle option. here official doc of sizable.

How to set the cursor some spaces away from the start in an EditText in Android? -

i have edittext allows user enter text default starting position. want move cursor starting position , set 6 dp away starting position. how can this? try using padding, edit text.hope works :) android:paddingleft="15dp"

javascript - Prevent user to leave my page in js -

in form have unshow modal. open modal if user click on "leave image" , ask if want leave. is possible in javascript (jquery ?) "stop" reloading or page change show modal , continue action (reload, next page, prev page, etc...) if user yes ? i tried: $(window).bind('beforeunload', function(){ return 'message show'; }); but don't want open browser popup, want mine ^^. there both window.onbeforeunload , window.onunload, used differently depending on browser. can assing them either setting window properties functions, or using .addeventlistener: window.onbeforeunload = function(){ // } // or window.addeventlistener("beforeunload", function(e){ // }, false); usually, onbeforeunload used if need stop user leaving page (ex. user working on unsaved data, he/she should save before leaving). onunload isn't supported opera, far know, set both.

asp.net mvc - Entity Framework DataServiceCollection Load not working -

i have separate projects service , ui. i have used entity framework fetching , showing data. server returns list of data count 5000. in ui have done following: dataservicecollection<entityt> entitycollection = new dataservicecollection<entityt>(); container proxy = new container(uri); var container = new servicereference1.container(uri); entitycollection.load(container.entities); the entitycollection count shows 1. issue. url hits function returns list of 5000 records. please suggest solution it.

Random Python module and creating chances -

i have text adventure game battle system in place already. of course turn based, both player , enemy deal damage points (in float). use random.uniform() function generate attack points every round. 0 stands missing enemy or player. since use floats chance pretty slim. want create condition there let's chance 1 in 5 attack points equal 0.00. condition must run on every round. how go it? there module use? note: think use random module ( random.randint(0,5) ) wondering if there other way. thanks! i think should use random.uniform() reserving 20% of values 0.00 attack points. hit = random.uniform(0, 10) if hit <= 2: damage = 0.00 else: damage = (hit - 2) / 8 this stupid example might help. or more simple: hit = random.uniform(0, 10) if hit >= 8: damage = 0.00 else: damage = hit / 8

javascript - Toggle slide out div with jQuery & push div onto new line -

i'm having small issue project i'm working on. it's simple i'm not overly proficient jquery , having few issues. want have grid of 4 item rows, once user clicks on div, slides out bio same width grid item (25%). pushes div beside onto new row. to give idea, it's "our team" page, page display photo of in grid , if click person slides out bio. here code: html <div class="team-list one-fourth nomargin"> <div class="team-photo"> <img class="front" src="{front_image}" alt="{title}" /> </div> <div class="team-bio"> team bio here </div> </div> css /* team page */ .team-list { position:relative; } .team-list .team-photo img { max-width:100%; } http://jsfiddle.net/7bjml/ many in advance! as understood looking this. hope help add handler sliding bio info: $('.team-photo').click...

Reading specific test steps from Quality Center with python -

i working quality center via ota com library. figured out how connect server, lost in ota documentation on how work it. need create function takes test name input , returns number of steps in test qc. far in question. import win32com win32com.client import dispatch # import codecs #to store info in additional codacs import re import json import getpass #for password qcserver = "***" qcuser = "***" qcpassword = getpass.getpass('password: ') qcdomain = "***" qcproject = "***" td = win32com.client.dispatch("tdapiole80.tdconnection.1") #starting connect td.initconnectionex(qcserver) td.login(qcuser,qcpassword) td.connect(qcdomain, qcproject) if td.connected == true: print "connected " + qcproject else: print "connection failed" #path = "subject\regression\c.001_band_tones" mg=td.treemanager npath="subject\regression" tsfolder = td.testsettreemanager.nodebypath(npath) print tsfol...

ios - How to call a label to display if the score is below e.g.:90 points? -

im making word game, there 2 possible labels "perfect!" shows when score 100 , "correct!" when score below 100, but i'm having trouble calling "correct!" label when score goes below 100! - (ibaction)btncheck:(id)sender { nsstring *answer = [_textbox.text stringbyreplacingoccurrencesofstring:@" " withstring:@""]; if([answer isequaltostring:@""]){ } else if ([answer isequaltostring:@"q"]) { _keyboard.hidden = yes; _textxclear.hidden = yes; //perfect button [_closeone sethidden:no]; [_wrongone sethidden:yes]; score = max (score +100, 0); [scorelabel settext:[nsstring stringwithformat:@"score: %d", score]]; coins = coins +5; if (score == 100) coins = 8; if (score == 0) coins = 0; if (score == 4) coins = 4; if (score == 3) coins = 3; if (score == 2) coins = 2; if (score == 1) coins = 1; [coinslabel settext:[nsstring stringwithformat:@...

Configuring Nginx Reserve proxy for webmin -

i have working https site running. config below working fine webmin. except when login web address rewrites port no 10000 next it, therefore getting error server not found. can me correct please? server { server_name webmin.example.com; listen 443; ssl on; ssl_certificate /etc/webmin/miniserv.pem; ssl_certificate_key /etc/webmin/miniserv.pem; access_log off; error_log off; location /requestdenied { return 418; } location / { proxy_pass https://127.0.0.1:10000; proxy_redirect off; #proxy settings proxy_redirect off; proxy_set_header host $host; proxy_set_header x-real-ip $remote_addr; proxy_set_header x-forwarded-for $proxy_add_x_forwarded_for; proxy_max_temp_file_size 0; ...

java - How to convert a string to an EObject? -

i trying convert string eobject : simpleanytype wrapper = xmltypefactory.einstance.createsimpleanytype(); wrapper.setinstancetype(ecorepackage.einstance.getestring()); wrapper.setvalue("test"); now, ve got object of simpleanytype. how convert eobject please explain. simpleanytype extends anytype, anytype extends eobject. have eobject.

c# - Return value from a method if the method throws an exception -

it's monday again , have question c# basics. happens return value method if method throws exception? specifically, happening "under hood" when exception being thrown inside method , effect have on return value? in situation, how return value calculated internally? let's there 2 scenarios: 1 return value of type int , of type object . default(t) going called internally when exception occurs? in such case, should consider return value of type int 0 while return value object null ? the short, oversimplified answer it won't return anything . code "breaks" wherever exception occurs , goes down stack until catches it. even if do happen catch exception, variable tried initialize method's return value remain before method called: var = 5; try { = mymethodthatthrowsanexception(); } catch { // @ point, variable still equals 5. } i should mention shouldn't feel concerned function's return value if throws exception. if...

css - I see my vertical menu twice -

i'm trying create (witch extension) vertical menu show's subcategories , not disappears when in specific category ore subcategory. till nothing working...i’ve tried extension : vertical navigation css classes. 1 nog showing deeper categories. , there 'sort by' menu. @ point i've uninstalled extension, still have double vertical menu, , can't away. ( example - mildly nsfw) in short terms: i want upper menu i want menu shows deeper subcategories if customer asking it i don't want menu disappear when in category itself we have hours of searching in item. , so grateful if of can us! thank you! you might looking similar this http://www.overpie.com/css/articles/css-vertical-fly-out-menu or http://designshack.net/tutorialexamples/verticalnav/index.html hope helps :)

Manipulating variables at compile time with C++ -

since lost track of c++11 , c++14 (not out yet suppose) changes, wondering if following possible in c++ or if there plan make working: need way query class or function whether uses variable or not. if not, should able add variable used in higher scope (either caller function or code instantiates class). i can @ runtime has performance penalty can't afford. writing own compiler sounds heavy. the canonical solution real problem not variable somehow query. i'd use template user may or may not instantiate. that's quite easy discover. it's existing mechanism works in c++98, 03 11 , 14. remember under ordinary c++ compilation model, can't query @ your compile time whether function will use variable when compiled. take time machine.

Neo4j Gremlin: all shortest weigthed path -

we using neo4j 2.0 embedded; have graph around 1 million of nodes, , 50 million of relationships; have find n shortestpath known cost property saw there no such method in graphalgo class of neo4j , thinking use gremlin (or other utility) in order find these paths. our wish specify relationship property consider shortest paths finding did find solution problem? how implement such functionality? any suggestion apreciated... thank angelo you can use gremlin calculate shortest paths. here's example in gremlindocs: http://gremlindocs.com/#recipes/shortest-path the following snippet section discusses use of "weight" property calculate cost of path: gremlin> g = tinkergraphfactory.createtinkergraph() ==>tinkergraph[vertices:6 edges:6] gremlin> g.v(1).oute.inv.loop(2){it.object.id!="3" && it.loops < 6}.path.filter{it.last().id=="3"}.transform{[it.findall{it instanceof edge}.sum{it.weight}, it]} ==>[0.4, [v[1], e[9...

linq-xml Query not returning expected results -

i have following xml file consists of html tags, shown below: <?xml version="1.0" encoding="utf-8"?> <html> <head> <title> title1 </title> </head> <body> <fragment id="heading1"> <h1> heading 1 </h1> </fragment> <fragment id="heading2"> <h2> heading 2 </h2> </fragment> <fragment id="paragraph1"> <p> paragraph 1 </p> </fragment> </body> </html> i trying extract fragment ids , display them using linq-xml. query shown below: xdocument xelement = xdocument.load("path\\to\\xmlfile"); var name = nm in xelement.descendants("body") select nm.element("fragment").attribute("id").value; console.writeline(name); the output query returns is: heading1 but want is: heading1 heading2 paragraph1 what doing wrong? kindly advice. thank y...

Jquery Table rotate verticaly if height is larger then monitor -

i try create animation table jquery when height larger resolution auto scrolling/rotate/marquee. but out luck. have try http://remysharp.com/demo/marquee.html plugin. this simple example, hope you'll find table on page when browser window smaller 400 pixels marquee plugin start. when browser window become greater 400 px marquee plugin stop <!doctype html> <html> <head> <style> #marquee{width:200px;} table{border-collapse:collapse;} table,td {border:1px solid black;} td{width:400px} </style> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script> <!--isert link marquee plugin download https://gist.github.com/remy/2484402--> <script type="text/javascript" src="marquee.js"></script> <script type="text/javascript"> $(document).ready(function(){ $('marquee').marquee(); var lar=$('td').width() function ...

android - UnsupportedException from Canvas.setBitmap(Bitmap) -

i'm creating app drawings , such under users control , let's them save it. way i'm trying achieve using custom bitmap on canvas draws saving resulting bitmap. everything working expected, until canvas.setbitmap(bitmap) called. i following error. 03-24 13:47:50.741: e/androidruntime(27888): fatal exception: main 03-24 13:47:50.741: e/androidruntime(27888): process: example.imageeditor, pid: 27888 03-24 13:47:50.741: e/androidruntime(27888): java.lang.unsupportedoperationexception 03-24 13:47:50.741: e/androidruntime(27888): @ android.view.hardwarecanvas.setbitmap(hardwarecanvas.java:39) code throwing exception: protected void ondraw(canvas canvas) { mresultimage=bitmap.createbitmap(width,height,moriginalimage.getconfig()); canvas.setbitmap(mresultimage); canvas.save(); if(moriginalimage!=null) canvas.drawbitmap(moriginalimage, width, height, paint); else canvas.drawtext("image loading...", width/2f-20, height/2,...

apache - Apache2 flooded with GET Requests -

i'm running several services redmine, continuum or tomcat. lately of them have been extremly slow. in worst cases had wait 5 minutes see front page of tomcat server. i decided take access.log file apache2 , noticed, server has been flooded requests. here's snipped of log file. 66.249.67.238 - - [24/mar/2014:14:10:15 +0100] "get /maven2/com/sun/jersey/jersey-server/1.7-snapshot/maven-metadata-maven2-repository.dev.java.net.xml.md5 http/1.1" 500 1084 "-" "samsung-sgh-e250/1.0 profile/midp-2.0 configuration/cldc-1.1 up.browser/6.2.3.3.c.1.101 (gui) mmp/2.0 (compatible; googlebot-mobile/2.1; +http://www.google.com/bot.html)" 23.239.123.39 - - [24/mar/2014:14:10:22 +0100] "get http://ads.yashi.com/12976 http/1.0" 500 1153 "http://www.edunyc.com" "mozilla/5.0 (windows; u; windows nt 6.1; en-us) applewebkit/534.16 (khtml, gecko) chrome/10.0.648.204 safari/534.16" 198.13.111.248 - - [24/mar/2014:14:10:23 +0100] "g...