Posts

Showing posts from July, 2010

java - Incompatible Types - found:int required:boolean -

i'm trying display: equivalent if first numerical input equal second input. what's wrong code? import java.io.*; public class twonum{ public static void main(string[] args){ int number; int number2; string input1=""; string input2=""; bufferedreader in = new bufferedreader(new inputstreamreader(system.in)); system.out.println("input number: "); try{ input1=in.readline(); }catch(ioexception e){ system.out.println("error!"); } number = integer.parseint(input1); try{ input2=in.readline(); }catch(ioexception e){ system.out.println("error!"); } number2 = integer.parseint(input2); if(number=number2) { system.out.println("equivalent"); } if(number>number2) { system.out.println("gre

java - JTextArea Displays 0 after calculate button clicked -

i'm writing code university, read user input , calculate charges (its hospital bill) but when press calculate jtextarea displays 0 value i'm newbie guidance appreciated the code is: import javax.swing.*; import java.awt.*; import java.awt.event.*; public class hospitalchargescalculator extends jframe implements actionlistener{ private jlabel hospitalstaylabel; private jlabel medicationlabel; private jlabel surgicalfeeslabel; private jlabel labfeeslabel; private jlabel rehablabel; private jlabel totallabel; private jtextfield hospitalstaytf; private jtextfield medicationtf; private jtextfield surgicalfeestf; private jtextfield labfeestf; private jtextfield rehabtf; private jtextarea totalchargesta; private jbutton calculateb; private jbutton exitb; public static final int width = 500; public static final int height = 350; static int totalstaycharge; static int totalmisc; static int totalcharges; static int totaldays; static int totalmedication; static int t

java - Elegant way to get Locale in Spring Controller -

i'm looking cleaner way (in spring 3.2) current locale explicitly calling localecontextholder.getlocale() @ start of each controller method. has compatible java annotation, i'm not using xml config. here's i'm doing currently. @controller public class wifecontroller { @autowired private messagesource msgsrc; @requestmapping(value = "/wife/mood") public string readwife(model model, @requestparam("whatimdoing") string iam) { locale loc = localecontextholder.getlocale(); if(iam.equals("playingxbox")) { model.addattribute( "statustitle", msgsrc.getmessage("mood.angry", null, loc) ); model.addattribute( "statusdetail", msgsrc.getmessage("mood.angry.xboxdiatribe", null, loc) ); } return "moodresult"; } } in spring 3.2 reference docs , section 17.3.3, supported method argument types: the following suppo

python - merge a few lists and regroup them into a dictionary to plot to multi-series Highcharts -

animal = ['hamster', 'dolphin', 'ant', 'hamster', 'hamster', 'ant'] date = [20151007, 20151007, 20151007, 20141007, 20120101, 20010101] total = [27, 5, 5, 5, 18, 40] i want combine these 3 list one. if animal same, should grouped , total should follow asc date. if animal type doesn't have enough date, it'll become 0. example: [{'name': 'hamster', 'data': [0, 18, 5, 27]}, {'name': 'dolphin', 'data': [0, 0, 0, 5]}, {'name': 'ant', 'data': [40, 0, 0, 5]}] i'm trying plot them highcharts dates in own list. [20010101, 20120101, 20141007, 20151007] i can combine lists using: zip(animal, date, total) but how them it's own type , arrange total asc date? edited this how got far. don't think it's efficient. think? improvement suggest? (only pythonic suggestion pls) b = [] k, v in enumerate(animal): counter = 0 in range

xcode7 - Linker Command Failed With Exit Code 1 after reopening Xcode -

Image
my code not working reason. didn't change name of project or anything, happened of sudden. i'm not sure happened need simulator work! my issue solved deleting framework in project's folders. guess duplicate.

c++ - Does a normal Windows Installation include the MFC100.dll? -

easy question, can't google answer. does normal windows installation include mfc100.dll libary? if so, since when mfc100.dll come windows installation , not vc+ redist 2010? , why isn't windows 10 including newer version of mfc (mfc120.dll) path mfc dll file windows(syswow64)\mfc100.dll sorry horrible english, i'm not native speaker. don't rely on mfc dll being installed on windows. msdn says : if dynamically link application mfc library, have redistribute msvcr100.dll because mfc dlls use shared version of c run-time library (crt). have redistribute mfc100u.dll or mfc100.dll. msdn blog says : windows not mfc delivery channel there no if or when. need mfc dll? must install it. , take care install version linked against (might change visual studio service pack).

javascript - Custom CKEditor Oembed consumer callback is invalid in Symfony -

i using latest ckeditor cdn 4.5.4. trying implement custom oembed consumer described here http://docs.ckeditor.com/#!/api/ckeditor.config-cfg-embed_provider i using symfony endpoint retrieving oembed information. reach url http://localhost/oembed/?url=https://www.facebook.com/someecards/posts/987699161267010&callback=ckeditor._.jsonpcallbacks[78] the url , callback provided me ckeditor , far understand, callback cannot altered. i using https://github.com/oscarotero/embed succesfully sorts of links. problem how choose return data symfony. if choose send response text string, works, on embeds facebook, include <script> tags getting processed , altering return. ideally use proper jsonp method symfony provides this... $response = new jsonresponse($this->payload, 200, array()); $response->setcallback($callback); return $response; however when this, told symfony... invalidargumentexception in jsonresponse.php line 77: callback name not valid. so ckedi

ios - Injecting global object in WKWebView -

i'm attempting add global object wkwebview loaded html expects object present (with api). have following setup prime html after loading. works in following trivial example, 'real' content loaded loadrequest fails "[error] referenceerror: can't find variable". have similar experience? @implementation viewcontroller - (void)viewdidload { [super viewdidload]; [self setupwebview]; } - (void)setupwebview { wkwebviewconfiguration *webconfiguration = [[wkwebviewconfiguration alloc] init]; wkusercontentcontroller *usercontentcontroller = [[wkusercontentcontroller alloc] init]; nsstring* jscode = @"var theobject = function() {}; \ theobject.prototype.sendthemessage = function() { \ window.webkit.messagehandlers.performaction.postmessage(messagetopost); \ }; \ var theobject = new theobject();"; wkuserscript *userscript = [[wkuserscript alloc] initwithsource:jscode

c# - Custom Hub Control for WP8.1 -

i have problems understanding how hub control built. main idea of want understand how build custom control allows perform gestures , not block controls inside. using hub control can press button , see callback (color , size changing) , move pointer left slide hub control. sorry such stupid question don't have enough experience find responses myself. in advance advice. the main problem associated using of gesturerecognizer . have fixed problem refusing use gesturerecognizer , starting use manipulation events on main container. the simplified template code: <style targettype="my:customhub"> <setter property="template"> <setter.value> <controltemplate targettype="my:customhub"> <grid x:name="rootgrid"> <contentpresenter x:name="mainpresenter" content="{templatebinding conte

handle no-button-is-pressed case in multi-step php form? -

i found question how use 2 submit buttons, , differentiate between 1 used submit form? answer use 2 differently named buttons <input type="submit" name="publish" alt="publish" value=""/> <input type="submit" name="save" alt="save" value=""/> and detect pressed by <?php if (isset($_post['publish'])) { // publish-button clicked } elseif (isset($_post['save'])) { // save-button clicked } ?> i found in answer of question how can tell button clicked in php form submit? 1 should not this, because might happen no button clicked. other ways submit form exist, , browsers/versions decide not send name/value of submit buttons in of these situations. example, many users submit forms pressing enter key when cursor/focus on text field. forms can submitted via javascript, more obscure methods. and 1 should rather use if ($_

ios - How to add elements to an array? swift -

this question has answer here: add element array in swift 9 answers everybody! i've started learning swift sorry if question dumb. want add values array "uu" using loop. every time overwrites "uu". pls help, thanks! my code that simple uu.append(newnumber)

javascript - Using Zotero translators to get author affiliation -

i'm working on project need author affiliation articles published on dblp . i'm setting translation server can them in github , following other instructions also. then set connection in java-program this: import java.io.bufferedreader; import java.io.inputstreamreader; import java.io.outputstreamwriter; import java.net.httpurlconnection; import java.net.url; import java.net.urlconnection; import org.json.*; public class zoterohandler { //function runing scan public static void scan(article article) throws exception { //setting url httpurlconnection given doi url urldoi = new url (article.getelectronicedition()); httpurlconnection conndoi = (httpurlconnection) urldoi.openconnection(); // make logic below easier detect redirections conndoi.setinstancefollowredirects(false); string doi = "{\"url\"smiley unsure"" + conndoi.getheaderfield("location") + "\",\"sessionid\"smiley unsure"

Append Url value to select dropdown menu using jquery -

i using textbox attached dropdown menu. textbox searching person name , dropdown list comes different categories. i used send search value , dropdown list selected value url , getting results, after displaying results dropdown menu value changing. getting url, cannot append select dropdown menu. here in url getting value of dropdown need append dropdown list text. <select id="menu"> <option value = "all"> </option> <option value = "people"> people </option> <option value = "conversations"> conversations </option> <option value = "products"> products </option> <option value = "circles"> circles </option> </select> $(document).ready(function () { var pathname = window.location.href; var urlval = pathname.substr(pathname.indexof('=')); var url = urlval.split('='); var url2 = url[1].split(&#

vba - powerpoint macro for selecting character -

how individually select characters in textframe w/o using for = 1 .characters.count in powerpoint. just in word( .moveright unit:=wdcharacter, count:=1, extend:=wdextend ). example: with activepresentation.slides(1).shapes(1).textframe.textrange .characters(start:=2, length:=5).select end will select 5 characters beginning second character in specified shape object.

php - How to solve "Fatal error: Out of memory" in wordpress server -

i got fatal error: out of memory (allocated 31981568) (tried allocate 32776 bytes) in /homepages/2/d213994292/htdocs/pub_site/wordpress/wp-includes/formatting.php on line 856 how solve it? double value of memory_limit in php.ini file , restart apache. for example: memory_limit = 512m >>>> memory_limit = 1024m

php - Checkout directly in Credit Card and disable the email and password input -

i'm using paypal express checkout ensure users pay directly credit card on landing page, there 2 fields wish remove, 'email' , 'password, tried insert code below: 'method'=> 'setexpresscheckout', 'landingpage' => 'billing', 'buyeremailoptinenable' => 0, for reason after disable buyeremailoptinenable , fields still appear. can't make them disappear. i think you're confusing express checkout payments standard . express checkout cannot take credit cards directly, paypal account payments (which might come credit card can't tell that) https://developer.paypal.com/docs/classic/express-checkout/integration-guide/ecgettingstarted/ the express checkout button gives buyers way pay, , complements existing payment solution . online shoppers appreciate convenience , security of paypal, can pay paypal balance, bank account, or credit card. following web page shows express checkout button side-by-side

typescript - Infer the type of object keys -

is possible in typescript declare structure type of function assigned error key in jquery.ajax inferred? report on type mismatch if 1 tries assign wrong function signature. $.ajax({ type: "post", url: listurl, jsonp: 'jsonp', datatype: "jsonp", success: onsuccescall, error: onerrorcall }); function onerrorcall(jqxhr, textstatus, errorthrown) { ... } this should done already, limited extent (limited the definition using , jquery api full of optionality). var listurl = 'http://www.example.com/'; function onsuccesscall (data, thing: boolean, another: boolean) { // implementation } function onerrorcall () { // implementation } $.ajax({ type: "post", url: listurl, jsonp: 'jsonp', datatype: "jsonp", success: onsuccesscall, error: onerrorcall }); in above example, onsuccesscall cause typescript issue warning not have signature compatible succes

c# - How to get JSON data very fast from URL in windows phone 8.1 app? -

i developing 1 windows phone app. in app getting json data service url , binding list box. and, in json data has 2500 cities. these cities came service , binding list box take 5 minutes time. then how getting data fast service? please me. below code: public async void insertcities() { try { await this.dispatcher.runasync(windows.ui.core.coredispatcherpriority.normal, async () => { var busclient = new newpavanapp.jsonwebclient(); var busresp1 = await busclient.dorequestasync(url.weburl + "getcities"); string busresult1 = busresp1.readtoend(); jarray busjsonarray = jarray.parse(busresult1); (int j = 0; j < busjsonarray.count; j++) { jobject jobj = (jobject)busjsonarray[j]; string id = (string)jobj["cityid"];

asp.net web api2 - LINQ to XML- only return variables and variable values -

good day calling sms client (using c# api v2 [rest])that return xml results follows: <apiresult> <data> <credits>100</credits> </data> <callresult> <result>true</result> <error /> </callresult> </apiresult> using linq xml, return variables object, i.e. credits: 100, result : true , , return json. i have tried following: //remove invalid chars var legalchars = removeillegalchars(results); xdocument po = xdocument.parse(legalchars); var list1 = po.root.descendants("apiresult"); without obtaining desired result. appreciated. you need newtonsoft.json package, , using xelement: xelement root = xelement.parse(@" <apiresult> <data> <credits>100</credits> </data> <callresult> <result>true</result> <error /> </callresult> </apiresult&g

artificial intelligence - Smarter than an Eighth grader? Kaggle AI Challenge. R -

i working on allen ai science challenge on kaggle. the idea behind challenge train model using training data provided (a set of eighth grade level science questions along 4 answer options, 1 of correct answer , correct answer) along additional knowledge sources (wikipedia, science textbooks, etc) can answer science questions (average?) eighth grader can. i'm thinking of taking first crack @ problem in r (proficient in r , c++; don't think c++ useful language solve problem in). after exploring kaggle forums, decided use topicmodels (tm), rweka , latent dirichlet algorithm (lda) packages. my current approach build text predictor of sort on reading question posed outputs string of text , compute cosine similarity between output text , 4 options given in test set , predict correct 1 highest cosine similarity. i train model using training data, wikipedia corpus along few science textbooks model not overfit. i have 2 questions here: does overall approach make sense?

JSON to Export .txt Order in Java -

i have code, , string coming json server, , use these if statements prioritize want exported text file, when run it, output isnt output expecting, see below: jsonobject attributeobject = objects.getjsonobject(objectattribute); string[] elementlist = jsonobject.getnames(attributeobject); (string attributename : elementlist) { if (attribute.equals("custodian")){ string value = objects.getstring("attributevalue"); system.out.print(value+","); out.write(value); out.append(","); } if (attribute.equals("custodian delegate")){ string value = objects.getstring("attributevalue"); system.out.print(value+","); out.write(value); out.append(","); } if (attribute.equals("authentication directory")){ string value = objects.getstring("attributevalue"); system.out.print(value+","); out.write(value); out.append(","); } if (attrib

python invalid syntax in comment -

using idle python 3.4.3. script gives user small quiz, calculates how many got right. i'm having invalid syntax error in comment before script runs. here whole code around comment. specific comment under line score = decimal.decimal(score) : score = amountright/7*100 """this takes amount of questions user got right, divides 7 (the total number of questions), multiplies 100 percentage correct , stores in variable score""" import decimal """this import function round off final percentage whole number instead of unnecessarily long decimal""" score = decimal.decimal(score) """this redefines score variable sort of roundable decimal. round() function in line below still function without line, print unneeded .0 before %""" print ("you got " + str(amountright) + " out of 7 right, or " + str(round(score,0)) + "%.") """the round() function works roundin

c# - Babel obfuscation causing Norton to treat exe as threat -

i'm using trial version of babel obfuscate primary output of winform app exe file , when run babel console norton catches exe file threat saying sape.heur.9c6d7. i've tried changing settings in babel , nothing seems work. when run babel post build event create android dll runs fine. has come across problem/know how fix problem? apparently there no fix issue.

java - @Autowired bean is null when referenced in the constructor of another bean -

shown below snippet of code try , reference applicationproperties bean. when reference constructor null, when referenced method fine. until have not had no problem using autowired bean in other classes. first time have tried use in constructor of class. in code snippet below applicationproperties null when called constructor when referenced in convert method not. missing @component public class documentmanager implements idocumentmanager { private log logger = logfactory.getlog(this.getclass()); private officemanager officemanager = null; private converterservice converterservice = null; @autowired private iapplicationproperties applicationproperties; // if try , use autowired applicationproperties bean in constructor // null ? public documentmanager() { startooserver(); } private void startooserver() { if (applicationproperties != null) { if (applicationproperties.getstartooserver()) { try { if (this.officemanager == nul

Beagleboard : not able to do ssh -

i connected beagleboard(beaglebone black rev 0a6a) via usb . able access via browser 192.168.7.2 . not able ssh board. able ssh board on yesterday , installed emebedded java on , working fine. today when again try connect board, it's not able connect. any preliminary thoughts on issue? i check forum thread. https://groups.google.com/forum/#!msg/beagleboard/ya2qe4repsy/q8_wklch5twj make sure have putty setup correctly https://learn.adafruit.com/ssh-to-beaglebone-black-over-usb/ssh-with-windows-and-putty connect via usb-serial adapter ssh 192.168.7.2 (username root, no password)

python - pandas: write df to text file - indent df to right by 5 white spaces -

i writing df text file so: file = open("pptx_comparision_log.txt", "w") df= df.to_string() file.write(comp_df) this works fine how can indent df sits 5 white spaces right. so this: dim_pptx qp_pptx absolute radio 0.0739 0.0753 bbc asian network 0.0013 0.0013 bbc radio 1 0.1441 0.1455 bbc radio 1xtra 0.0057 0.0058 bbc radio 2 0.2336 0.2339 to: dim_pptx qp_pptx absolute radio 0.0739 0.0753 bbc asian network 0.0013 0.0013 bbc radio 1 0.1441 0.1455 bbc radio 1xtra 0.0057 0.0058 bbc radio 2 0.2336 0.2339 is possible? thanks. you can string manipulation after conversion replacing df.to_string() " "*5 + df.to_string().replace("\n", "\n ") .

java - ArrayAdapter using ArrayList but display only 1 value of an array on Spinner -

i have arraylist<string[]> lstprovinceinfo this {"id":"1","province_code":"hni","province_name":"hà nội"}, {"id":"2","province_code":"hcm","province_name":"tp hồ chí minh"}, {"id":"3","province_code":"dng","province_name":"Đà nẵng"} now i'm creating arrayadapter use spinner dropdown this arrayadapter<string[]> adapter = new arrayadapter<>(this, r.layout.custom_ddlist, lstprovinceinfo); adapter.setdropdownviewresource(android.r.layout.simple_spinner_dropdown_item); the display result got in spinner is: [ljava.lang.string;@3286c7b8 [ljava.lang.string;@3286c808 [ljava.lang.string;@3286c818 how can display "province_name" part in arraylist on spinner still keep follwing id, province_code? in advanced. create customarrayadapter .... you won;t allow pas

android - how to select the video from gallery in phonegap? -

please me 1 how select video gallery in android , ios in cordova tried click here select video media not working me... var picturesource; var destinationtype; var mediatype; document.addeventlistener("deviceready", ondeviceready, false); function ondeviceready() { picturesource = navigator.camera.picturesourcetype; destinationtype = navigator.camera.destinationtype; mediatype = navigator.camera.mediatype; } navigator.camera.getpicture(onphotourisuccess, onfail, { destinationtype: destinationtype.file_uri, mediatype: mediatype.video, sourcetype: source }); function onphotourisuccess(imageuri) { console.log(imageuri); } function onfail(message) { console.log(message); } i used same code implement in app can't come.... you can try snippet below: navigator.camera.getpicture(onsuccess, onfail, { quality: 100, destinationtype: camera.destinationtype.file_uri, sourcetype: camera.picturesourcetype.photolibrary, mediatype: came

cloudfoundry - Deploy with Travis to CF with secret environment variables -

currently have 2 .yml files, 1 travis build , 1 cloud foundry deployment. i specified secret environment variables within cf-manifest.yml cloud foundry. due secret environment variables, not able use convenient deployment option travis offers because don't want push cf-manifest.yml git repository. is possible deploy cloud foundry travis , specify environment variables? if is, encrypt function travis provides. add encrypted env variables .travis.yml store following information: cf user, cf password , secret environment variables need set later deployed cloud foundry application env: global: #cf_user - secure: djsalkdjalkduiojdklsajdlksajdo83092183jsjsj= #cf_password - secure: jdjuuuu1u1717187983198238217321983hhhshshsh= #secretenvvariable - secure: jdkljlkj0888shhshuhdsa45d64dsa1d3sa5d46sads= maintain custom deployment within .travis.yml after_success: - curl -l "https://cli.run.pivotal.io/stable?release=linux64binary&source=github" | t

php - Returning results from MySQL as a multidimensional array -

i have store tree data structure in mysql table. node can have number of children , depth of tree not fixed. have created table column of parent node can traverse tree. i need fetch whole tree rooted @ given node table , render in php page. can make procedure return children of given parent , render it. have fire query recursively each node. want return whole tree structure rooted @ given node in single query. there way ? what looking 'ways of storing hierarchical data' in relational databases. if want avoid recursion have duplicate bit of data in form of column or table holding ancestor/descendant information. have @ following url describing few ways of doing this: http://www.sitepoint.com/hierarchical-data-database/

One Android Studio project to deploy multiple apps -

i have developed app android studio. product owner has need deploy different apps different app names, app icons , themes. apps same different branding share code. i going automate deploy builds gradle scripts have realized package should different each app. can deploy these apps google play using 1 project? can change package name each deploy? as ken wolf pointed out, gradle, when using build variants, build system enables uniquely identify different packages each product flavors , build types. the application id in build type can added suffix specified product flavors: productflavors { pro { applicationid = "com.example.my.pkg.pro" } free { applicationid = "com.example.my.pkg.free" } } buildtypes { debug { applicationidsuffix ".debug" } } .... more info: http://developer.android.com/intl/es/tools/building/configuring-gradle.html

php - Not Sequencial Array to JSON (Keys are string) -

i'm trying create custom array, custom array keys. until here works well. foreach ($results $value){ // $value['month'] string (varchar) $return[$value['month']]['working'] = $value['work_job']; } but, when return json, i'm getting follow situation. "jobs": { // here need [ instead of {, how can fix it? "2": { "working": "1" }, "5": { "working": "4" }, "6": { "working": "3" } } $return = array("jobs" => $return, "testing" => 'testing'); tks there's little concept issue in this. in php, hashes or dictionaries represented arrays, not in other languages. if array composed syntax $array['key'] = $value; it interpreted json encoder object. understand $array object, 'key' property of $array , $value value of property, being encoded

html - angularjs custom validation on input type="text" -

<section class="col col-6"> <label class="input"> <i class="icon-append fa fa-building"></i> <input type="text" ng-model="customer.name" name="customername" placeholder="customer name" required> <span style="color:red" ng-show="myform.customername.$dirty && myform.customername.$invalid"> <span ng-show="myform.customername.$error.required">name required</span> </span> </label> </section> how can implement custom validation on it? m applying angularjs validation works fine want custom valuation on tag. want user insert alphabets in textbox. use ngpattern directive , provide appropriate regular expression: <input ng-pattern="/^[a-za-z]*$/" />

drop down menu - Zurb Orbit Slider data-orbit-link on Ipad -

i using zurb foundation , orbit slider display product images on clients website. has requested when select package dropdown list should change image 1 relevant package. can link image package id in database , works fine using desktop. when using ipad, changing dropdown box has no effect on image whatsoever. can tell me why? , how fix this? of our customers come tablet , mobile rather desktop, real issue @ moment. many thanks example: http://www.bitandpiecesvape.co.uk/shop/atomisers-and-tanks/aspire-nautilus/ <!-- [orbit slider] --> <ul data-orbit data-options="navigation_arrows: false; timer: false"> <?php $pricelinkarray = array(); for($i=0;$i<count($imagearray);$i++) { if($imagearray[$i]["spp_id"] > 0) { $pricelinkarray[$imagearray[$i]["spp_id"]] = $i+1;

node.js - How can I determine which encoding JSON.stringify() used? -

i'm putting node/express app returning json serialized using json.stringify() . i'd set content-type http header include encoding info--such application/json; charset=utf-16 . my understanding json.stringify() might produce utf-16 or ucs-2 encoded results. how know encoding used serialize json, , what's best way inform user-agents of correct encoding? as far understand, returns instance of type string , defined sequence of 0 or more 16-bit unsigned integers (see spec ). i cite link above: a string value member of string type. each integer value in sequence represents single 16-bit unit of utf-16 text. however, ecmascript not place restrictions or requirements on values except must 16-bit unsigned integers. because of that, guess it's implementation defined. this maybe part of spec of interest you.

javascript - if div height is greater than 100 move exceed text to another div -

i have 2 contenteditable div, want if div (div a) height become greater 100px move exceed text div (div b). i am learning (for example, here div height greater 100px, move "javascript" div) javascirpt. and next time if more text added div , move text base on height again. testing again i am (for example, here div height greater 100px, move "learning javascript" div) learning javascirpt. jsfiddle link http://jsfiddle.net/mhabib555/zvq96xy6/2/ function checkheight(){ var diva = document.getelementbyid('a'); var divb = document.getelementbyid('b'); var status = document.getelementbyid('status'); status.innerhtml = diva.clientheight; if(diva.clientheight>100) { //move exceeded text div b } } <div contenteditable='true' id='a' onkeyup='checkheight()'>edit me</div> <div contenteditable='true' id='b'>edit me 2&

c# - Except() and Intersect() doesn't work correctly - LINQ -

this question has answer here: using linq except not working thought 3 answers i not sure why not working correctly. possibly because trying use expressions on data class instead of single field in class? adminonlygroups supposed return groups admin has , user doesn't returning of admin groups useronlygroups doing same, returning of user groups commongroups supposed return groups have in common there 2 of, returning null or empty data class [datacontract] public class investigatorgroupdata { [datamember] public int investigatorgroupid { get; set; } [datamember] public string investigatorgroupname { get; set; } } snippet of controller ienumerable<investigatorgroupdata> admingroups = proxy.getinvestigatorgroups(adminid); ienumerable<investigatorgroupdata> usergroups = proxy.getinvestigatorgroups(userid); // groups

c - GLFW how to drag undecorated window? -

i'm stuck trying make window dragable. here code, #include <stdio.h> #include <math.h> #include <gl/gl.h> #include "include/glfw/glfw3.h" void cursor_position_callback(glfwwindow* window, double x, double y); void mouse_button_callback(glfwwindow *window, int button, int action, int mods); int cp_x; int cp_y; int wrel_cpx; int wrel_cpy; int w_posx; int w_posy; int buttonevent; int main(){ glfwinit(); glfwwindowhint(glfw_decorated, 0); glfwwindow *window = glfwcreatewindow(640, 480, "undecorated resizable", 0, 0); int w_width; int w_height; int ccp_x; int ccp_y; glfwsetcursorposcallback(window, cursor_position_callback); glfwsetmousebuttoncallback(window, mouse_button_callback); glfwmakecontextcurrent(window); while(!glfwwindowshouldclose(window)){ if(buttonevent == 1){ glfwsetwindowpos(window, wrel_cpx - cp_x, wrel_cpy - cp_y); } glfwswapbuffers(win