Posts

Showing posts from March, 2015

c# - How do I create a Web Service Reference to a TLS 1.2 WebService? -

we received message utah tax authority upgrading web service tls 1.2. when tried create web service reference in visual studio 2010 got exception "could not establish secure channel ssl/tls authority 'tap.tax.utah.gov'.” the address is: https://tapstaging.tax.utah.gov/efile/mfet/wsdl/ there not seem anyplace set protocol use when creating web reference. okay, got it. @ least able 'create' web service. rebooted machine , added registry key hkey_local_machine\software\wow6432node\microsoft.netframework\v4.0.30319 node , seemed work. i forced use x86 platform due company using very, old database drivers may have been solution or reboot, either way feel little bit less helpless. here registry keys linked page: [hkey_local_machine\software\microsoft.netframework\v4.0.30319] "schusestrongcrypto"=dword:00000001 [hkey_local_machine\software\wow6432node\microsoft.netframework\v4.0.30319] "schusestrongcrypto"=dword:00000001

Android BottomSheetBehavior, how to disable snap? -

standard android bottomsheetbehavior has tree state: hidden, collapsed , expanded. i want allow user "leave" bottom sheet between collapsed , expanded. now, default behavior, snap collapsed or expanded based closest. how should disable snap functionality? i present way achievie such functionality view extending bottomsheetdialogfragment . expanding: first of overrive onresume : @override public void onresume() { super.onresume(); addglobalayoutlistener(getview()); } private void addglobalayoutlistener(final view view) { view.addonlayoutchangelistener(new view.onlayoutchangelistener() { @override public void onlayoutchange(view v, int left, int top, int right, int bottom, int oldleft, int oldtop, int oldright, int oldbottom) { setpeekheight(v.getmeasuredheight()); v.removeonlayoutchangelistener(this); } }); } public void setpeekheight(int peekheight) { bottomsheetbehavior behavior = get

string input in linked list [C] -

i learning linked lists. wrote little programm myself practising mechanism linked lists. first attempt trying small pokedex (without saving anything). trying setup input correctly. works fine, no errors , can execute it. the problem 2nd time of inputing pokemon name not read in data, instead skips reading in , goes directly scanf function, why case? void addpokemon(void){ pokemonptr firstptr; pokemonptr thispokemon; firstptr = null; firstptr =(pokemon *) malloc(sizeof(pokemon)); firstptr->name = malloc(sizeof(char) * pokemon_length); printf ("enter name of pokemon.\n"); fgets(firstptr->name, pokemon_length, stdin); the problem right here, fgets not being executed, not prompt user enter string. printf ("enter number of pokemon.\n"); scanf("%d",&firstptr->number); firstptr->next =(pokemon *) malloc(sizeof(pokemon)); thispokemon = firstptr->next; int = 0; while (i < 1

vb.net - I am trying to deserialize a JSON but Newtonsoft.Json is throwing this error -

cannot deserialize current json object (e.g. {"name":"value"}) type 'retail_web.helpers+sale1[]' because type requires json array (e.g. [1,2,3]) deserialize correctly. fix error either change json json array (e.g. [1,2,3]) or change deserialized type normal .net type (e.g. not primitive type integer, not collection type array or list) can deserialized json object. jsonobjectattribute can added type force deserialize json object. path 'sale.saleid', line 1, position 73. json : { "sale": { "saleid": "54", "timestamp": "2016-06-10t13:03:16+00:00", "discountpercent": "0" } } model : public class helpers public property sale sales() public class sales public property saleid string public property timestamp string public property discountpercent string public property completed string end

python - OSError: [Errno 13] Permission denied installing TensorFlow with Anaconda -

i followed instruction tensorflow's official site: sudo pip install --upgrade https://storage.googleapis.com/tensorflow/mac/tensorflow-0.8.0-py2-none-any.whl but got error: oserror: [errno 13] permission denied: '/users/myname/anaconda/lib/python2.7/site-packages/external/__init__.py' after re-insalling anaconda, got different error installing collected packages: setuptools, protobuf, numpy, tensorflow found existing installation: setuptools 20.3 cannot remove entries nonexistent file /anaconda/lib/python2.7/site-packages/easy-install.pth pip install --upgrade --ignore-installed https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.10.0-cp35-cp35m-linux_x86_64.whl use "--ignore-installed" flag prevent errors easy_install.

linux - Can't mount removable drive after formatting to ext -

i'm trying install crouton on usb stick chrome os. procedure first thing did unmounted: sudo umount /dev/sda1 then formatted ext: sudo mkfs.ext4 /dev/sda1 then try mount again running command: sudo mount /dev/sda1 error mount: can't find /dev/sda1 in /etc/fstab i dont know linux flavour you're using. mount appeared fail , looked in fstab file (/etc/fstab ) mounting options. you try. ~]# mkdir /mount/point ~]# mount -t ext4 /dev/device /mount/point or to mount permanently add fstab. ref /etc/fstab overview all best

linux - How do I configure Docker to work with my ens34 network interface (instead of eth0)? -

does know how docker decides nic work docker0 network? have node 2 interfaces (eth0 , ens34), however, requests go through eth0 forwarded container. when vm provisioned , docker installed, started silly test: created centos vm, installed netcat on , committed image. started daemon container listening on port 8080. used: docker -it -p 8080:8080 --name nc-server nc-server nc -vv -l 8080 so tried connect container listening on port 8080 node in same network (in same ip address interface ens34). did not work. whereas when sent request machine ip address eth0, saw reaction in container (the communication worked). "tailing" output with: docker logs -ft nc-server my conclusion experiment: there's mysterious relationship between eth0 (primary nic) , docker0, , requests sent ens34 (10. ) interface never forwarded veth / docker0 interfaces, requests go through eth0 (9.*). why's that? also, know can make work if use --net=host, don't want use that... doesn

appcompat - DrawerLayout, NavigationView, and android:Theme.Material.Light not compatible? -

i'm trying experiment, first time not using appcompatactivity , using new material themes. have no need or desire backwards compatibility in particular app, building marshmallow . the intent initial activity have actionbar navigation menu on left works fine in appcompat . however, after setting basic theme stuff no longer use appcompat themes, changing layouts, , trying crank main activity, indexoutofboundsexception occurs after activity's oncreate() method finished. exception happens during intialization of internal class android.support.design.internal.navigationmenuitemview . the same exception happens whether navigationview , related menu defined in xml, or added programmatically. i'm pretty sure whatever wrong related new material theme , not using appcompat stuff. has else run this? should work, or being dumb? here snippets: app style customizations removed: <style name="apptheme" parent="android:theme.material.light"

java - spring boot data jpa mysql could not create database -

Image
i new in spring post code, application.properties spring.datasource.url=jdbc:mysql://localhost/spring spring.datasource.username=root spring.datasource.password= spring.datasource.driver-class-name=com.mysql.jdbc.driver spring.jpa.database-platform=org.hibernate.dialect.mysqldialect spring.jpa.hibernate.ddl-auto=update and entity package model; import javax.persistence.entity; import javax.persistence.generatedvalue; import javax.persistence.generationtype; import javax.persistence.id; @entity public class person { @id @generatedvalue(strategy = generationtype.auto) private long id; private string name; private string phone; private string adresse; public long getid() { return id; } public void setid(long id) { this.id = id; } public string getname() { return name; } public void setname(string name) { this.name = name; } public string getphone() { return phone; } public void setphone(string phone) { this.phone = phone; } public string

.net - Get user's email address from Twitter with C# and OAuth -

i have app whitelisted on twitter able obtain email address when log in , i'm using tweetsharp library authenticate users, don't see way pass in parameter request email address using library. know it's old library , think requesting user's email relatively new maybe it's not possible w/o digging through source, updating , recompiling assembly? if has been able accomplish tweetsharp, please let me know. tia after digging through source of tweetsharp bit, got lost in layer upon layer upon layer...like trying find needle in 20 haystacks. appreciate link tweetinvi linvi, decided exercise brain bit evening , see if write scratch. i spent time looking on find on twitter , way oauth beyond funky. found php solution handles oauth , tweaked bit make return email address. armed that, translated php c# , got working in own home baked solution. i posted working solution here: http://www.burritostand.com/log-in-to-twitter-with-oauth-and-c-sharp-and-get-t

Possible to create a funnel using flurry event parameters? -

i have few events in apps have parameters example ads - custom event network name - event param status - event param so main event ads , i'm passing in network name "admob" example , status "failed" example. is possible in flurry see how many users saw "admob" network returned status of "failed"? yes there couple of ways can calculate number of user triggered event specific parameter value. 1) https://dev.flurry.com open project , visit manage -> segments. can create segment of users have triggered event specific parameter value. 2) can use flurry's explorer tool perform calculation quickly. see green banner @ top of developer portal or 'explorer' link project page.

Windows Store Apps (Windows 8) vs UWP -

what's difference between windows store apps (introduced in windows 8) , universal windows platform apps (introduced in windows 10). how share development point of view. if spent time learning how build windows store apps can knowledge transferred uwp development? i add more previous answers. the main , important thing universal windows 10 apps compiled native code (with .net native compiler). from developer point of view there difference between debug , release. when debugging uwp app in visual studio running intermediate language (with jit/just-in-time compilation machine code) means fast compilation , deployment. if decide build app in release configuration - app utilizes .net native toolchain. takes more time compile, optimized lot more run time performance. to read more please see below article: https://blogs.windows.com/buildingapps/2015/08/20/net-native-what-it-means-for-universal-windows-platform-uwp-developers/ the second important thing windows 10

java - How to get the project base directory in a multi-module Maven project? -

we have multi-module maven project, looks this: parent-module -> dao-module-1 -> dao-module-2 -> algorithms-module -> jaxb-module -> jaxrs-module -> webapp-module i have code in algorithms-module needs write image webapp-module. way, end-users can point browsers url in webapp-module , retrieve image. without hardcoding path parent-module, what's best way path parent-module? there default property in maven has value? if not, setting property in pom files solution? i believe can use ./ @ beginning of string path if wan keep relative. alternately, use system.getproperty("user.dir") absolute path parent project folder.

c# - How to export selected data from my ASPx DevExpress gridview -

i need export xls selected row of devexpress gridview. when try export grid, creates empty file. think due callback clear data in grid before exporting. this samples of aspx page. the load data button <asp:imagebutton id="imagebutton1" runat="server" imageurl="~/styles/images/load.png" onclick="imagebutton1_click" /> the gridview <dx:aspxgridview id="grid" clientinstancename="grid" runat="server" autogeneratecolumns="false" keyfieldname="car"> <columns> <dx:gridviewcommandcolumn showselectcheckbox="true" visibleindex="0" caption=""> </dx:gridviewcommandcolumn> <dx:gridviewdatatextcolumn caption="category" visibleindex="1" fieldname="category" name="category" groupindex="0" sortindex="0" sortorder="

intellij idea - Java Compact profile for Windows(How?) -

i using oracle java development kit. developed application javafx,h2database , jasper studio. simple java program more 190mb if include jre bundle. suggested use java compact profile reduce size. i have downloaded ejdk , tried use jrecreate.bat on windows. makes compact profile linux. don't see files windows. i using intellij ide, don't see option in ide too. how create compact profile in windows? possible in intellij ide? other way windows? no download option of profile? there answer how create compact profiles don't want use openjdk. if adventurous, use jigsaw , java 9 access edition , provides modular jre , can used run javafx applications requiring minimal runtime bundle application. for java 8, can refer following answer: build custom jdk, delete useless libs

python - How do I use values from a tuple which is in a list of tuples as arguments for a function? -

i'm trying construct simple tilemap thingy, part of larger project, , 1 of solutions came out use function so: def tile((value, x, y)): if value == 1: pygame.draw.rect(screen, (0, 0, 0) (x, y, 64, 64), 0) the idea being set level out list of tuples contain value denotes tile drawn there, , coordinates of tile. this, of course, doesn't work since can't use tuple argument. my solution instead values out of tuple in list: def tile(value, x, y): if value == 1: pygame.draw.rect(screen, (0, 0, 0) (x, y, 64, 64), 0) level = [(1, 0, 0), (rest of list)] tile(level[0[0]], level[0[1]], level[0[2]]) which didn't work, , gave me traceback (most recent call last): tile(level[0[0]], level[0[1]], level[0[2]]) typeerror: 'int' object has no attribute '__getitem__' does have workaround this? way can feed tuple function series of arguments? or using idiosyncratic method won't ever work ever? i'm guessing due blinding in

ember.js - Can't get data from a computed property with ember-model -

i making app ember.js , ember-model i have model named plugin defined follows: eme.plugin = ember.model.extend id: ember.attr() name: ember.attr() description: ember.attr() downloads: ember.attr() tags: ember.attr() eme.plugin.url = "/api/v1/plugins" eme.plugin.adapter = ember.restadapter.create() eme.plugin.collectionkey = 'plugins' i want show downloaded in index.hbs ( use ember-rails ) and fetch data in indexroute 's setupcontroller hook: eme.indexroute = em.route.extend setupcontroller: (controller, model)-> console.log eme.plugin.findall().toarray() controller.set 'plugins', eme.plugin.findall() output : [nextobject: function, firstobject: undefined, lastobject: undefined, contains: function, geteach: function…] but in chrome console execute eme.plugin.findall().toarray() , got results follows: [{ __ember1377710636537: "ember404" __ember1377710636537_meta: meta _dirtyattributes: a

shell - Extracting lines from a file that match a list of IDs -

hopefully i'm going make sense here... i have huge file - each line represents data different individual. want grep (or extract) out information (lines) individuals - don't want keep greping out individuals individually appending @ end curious whether there loop can set proving text file ids (ie id001, id002... id100) or variable unique each individual. i'm new programming i'm not sure should googling/looking answer - possible in shell? apologies might simple question. thanks! edit 1: i'm adding little more info here: format might different file genetics file , has following format: fam001 id001 a t t tc t a…… g fam001 id002 a t t c c g…… t c fam004 id003 a t g t g a…… g . . fam100 id100 g c t c g t g…… t g is possible set loop, say, similar to/includes this: for f in $( cat ~/famid.txt ) with famid.txt as: fam001 fam050 fam087 to able run analysis on individuals famid id running program on families in list provided? hope makes sense.

android - How to make textview with drawable on the left which could be set programmatically from a url coming from server -

Image
how make textview drawable on left that(drawable) can set programmaticaly url coming server. well, first step decode image url. you this: string yoururl = "http://someurl"; // insert url here // connect, instance of inputstream httpurlconnection connection = (httpurlconnection) new url(yoururl).openconnection(); inputstream inputstream = connection.getinputstream(); // decode stream bitmap , create drawable bitmap tempbitmap = bitmapfactory.decodestream(inputstream); drawable drawable = new bitmapdrawable(getresources(), tempbitmap); and then, set compound drawable on left side of textview : // order left, top, right, bottom, need set first param yourtextview.setcompounddrawables(drawable, null, null, null);

Python OpenCV face detection code sometimes raises `'tuple' object has no attribute 'shape'` -

Image
i trying build face detection application in python using opencv. please see below code snippets: # loading haar cascade classifier cascadepath = "/home/work/haarcascade_frontalface_default.xml" facecascade = cv2.cascadeclassifier(cascadepath) # dictionary store image name & number of face detected in num_faces_dict = {} # iterate on image directory. # read image, convert in grayscale, detect faces using haarcascade classifier # draw rectangle on image img_fname in os.listdir('/home/work/images/caltech_face_dataset/'): img_path = '/home/work/images/caltech_face_dataset/' + img_fname im = imread(img_path) gray = cv2.cvtcolor(im, cv2.color_rgb2gray) faces = facecascade.detectmultiscale(im) print "number of faces found in-> ", img_fname, " ", faces.shape[0] num_faces_dict[img_fname] = faces.shape[0] (x,y,w,h) in faces: cv2.rectangle(im, (x,y), (x+w,y+h), (255,255,255), 3) rect_img_

css - twitter bootstrap fluid row shifted down because of float-left div -

i'm trying have 2 column layout. first column fixed width, second 1 fluid. can done in way , works fine regular content. .left { width:200px; float:left; background-color:gray; } .right { background-color:red; margin-left:200px; } fiddle: http://jsfiddle.net/ergec/t7s3k/1/ problem when comes point need bootstrap fluid rows on right column, following problem occurs. not first row-fluid rest shifted down right below left column. fiddle: http://jsfiddle.net/ergec/fuwar/ i can fix wrapping span12 fiddle: http://jsfiddle.net/ergec/kz7vc/ but why have wrap in span12?

Realm Objective C: No visible @interface for 'RLMObject' declares the selector 'createOrUpdateInRealm:withValue:' -

cannot figure out why error. no visible @interface 'rlmobject' declares selector 'createorupdateinrealm:withvalue:' i have included realm/realm.h header define rlmobject in manner class aclass = nsclassfromstring(modelname); rlmobject *m = [[aclass alloc] init]; then create nsmutabledictionary contain values want partially update on rlmobject. nsmutabledictionary *updatevalues = [[nsmutabledictionary alloc] init]; and call createorupdateinrealm:withvalue: on m [m createorupdateinrealm:realm withvalue:updatevalues]; but error. have no idea why happens? createorupdateinrealm:withvalue: should called on subclass, not on instance. you should use this: customobject *mycustomobject = [customobject createorupdateinrealm:realm withvalue:dictionary]; where customobject subclass of rlmobject .

Cygwin and MinGW -

i'm trying make decision whether install cygwin. i'm using tdm-gcc 64bit compiler on windows 7. due few ridiculous build issues whenever build on windows (libraries etc) wanted confirm of assumptions correct. have looked @ website , number of forum posts still aren't sure have complete grasp of does. confirm or deny below. 1 - cygwin provides set of tools gnu tools etc can utilized compile programs, create makefiles, more, etc. 2 - cygwin provides command line interface building programs (unix like)? 3 - cygwin provides compatibility layer emulates unix or posix framework? 4 - if have cygwin don't need use tdm-gcc 64bit compiler cygwin provides it's own compiler. (what compiler called, i'm not sure)? 5 - if compile program in c++ using cygwin on windows, can run binary on pc windows installed if cygwin not installed on pc? thanks, realize these menial questions cygwin mailing lists take weeks respond questions thought ask programming commu

php - how to decode an encoded image string using base64 -

Image
i trying code not getting img output. please me or suggest other way.how display image. <?php function base64_to_jpeg($base64_string, $output_file) { $data = explode(',', $base64_string); print_r($data[1]); return $output_file; } $my_base64_string = "data:image/png;base64,ivborw0kggoaaaansuheugaaamyaaab4caiaaaamoropaaann0leqvr4no3ae0xt5xsh8eobfjpewqoirfy01bwdgupykk5dn/acgrhlchsyeqdxmzmcm5tdzcsyuqwdji1zwcieuoyuyrumsbiiggyikwxhruy4lmvgfjfbyzqlt/1xfnlzdk5ba/v+/ns+f/u8fc7znnp8sk8p+dkcdulb7d+/n3yhuqkignj77bevsqvcosaioru7u7gxexw6qppuajvzz84hnthxgicio0epnjy2dnd3ozrqr3pqw1ntu8w6mopa0lrr0deeqad5covcqvqy56djj4mjqxoy14g57utkpnprqjud1iwrx8ocg5d9tdrzerq/ptq5totmo54h4pak2r2vr6+vr48gijqagvktmpoa6nxxdbq6wwfoisuljsuljtkcjpkseuqoqj95fk7raa6c1iu30fyskhknc9dxu+fc93iskpjcxqfahlqu9xiycxcyn1znxk/314c6h3adacfjorbznxkax0ckagyqkyazrapgbpecmegkagyqkyazrapgbpecmegkagyqkyazrapgbpecmegkagyqkyazrapgbpecmegkagyqkyazrapgbpecmegkagyqkyazrapgbpecmegkagyqkyazrapgbpecmegkagyqkyazrapgbp

r - foreach cannot find `i` used in foreach(i=1:N) -

i'm having troubles variables inside foreach . load cluster , set couple of vectors: library(doparallel) ncores <- detectcores() - 2 cl <- makecluster(ncores, outfile="", port=11439) registerdoparallel(cl) results <- rep(na,10) values <- 20:30 then, not work: # error: object 'i' not found foreach(i=1:10) %dopar% results[i] <- stopcluster(cl) while does: # ok foreach(i=1:10) %dopar% values[i] stopcluster(cl) how come finds i when used inside [i] in left hand side, not find when used in right hand side? from comment: try curly braces. foreach(i=1:10) %dopar% { results[i] <- } not example, experienced better use curly braces in r. many problems can avoided using them. , apparently there more advantages of these little helpers, may see while browsing through internets (e.g. see here ).

javascript - Find resultant of two asynchronous ajax request in xhr onprogress -

i trying find images in ajax request response text , fetch src url using in ajax request. i need know progress of loading each image , show resultant of progress in progress bar. can see if image1 loaded 10%; , image2 20%. my result decreases 20% 10% . progress bar goes backward , goes forward. any help? or solution? parseresult: function(result, navnumber) { var self = this; var imagesmatter = $(result).find('img'); var imageslength = imagesmatter.length; // if there image in ajax request fetch imgs using ajax show progress bar if (imageslength >= 1) { var = 0, complete = 0, temp = 1; navigation.progress.fadein(50); imagesmatter.each(function() { var $this = $(this); var url = $this.attr('src'); $.ajax({ url: url, xhr: function() { var xhr = new window.xmlhttprequest(); xhr.addeventlistener("progress", function(evt) {

wmi - wbemtest doesn't show certain data after executing a query -

i have bitlocker enabled on machine , want use wbemtest.exe utility view properties bitlocker data. according properties section @ msdn , of data want retrieve deviceid, driveletter, persistentvolumeid, , protectionstatus. however, when execute query select * win32_encryptablevolume using wbemtest.exe, 1 object gets returned, , bitlocker deviceid. want query return driveletter , other properties. do retrieve these? data should there, because c# app using system.management able data on other properties without trouble (by assigning return value of managementclass getinstances() method a managementobjectcollection.) it turns out able view data need quite using wmi code creator utility. i found information on windows-noob

itext7 - iText 7 Hello World example fails with NoClassDefFoundError -

working down first example of itext 7 code causes noclassdeffounderror @ step 4. if can point error coming helpful? import com.itextpdf.kernel.pdf.pdfwriter import com.itextpdf.kernel.pdf.pdfdocument import com.itextpdf.layout.document import com.itextpdf.layout.element.paragraph //step 1 - writer writer = new pdfwriter(new fileoutputstream(dest)) //step 2 - pdf pdf = new pdfdocument(writer) //step 3 - document document = new document(pdf) //step 4 - content document.add( new paragraph ( 'hello world!' ) ) this produces java.lang.noclassdeffounderror: not initialize class com.itextpdf.io.font.fontprogramfactory code being run under groovy why more sparse io, kernel , layout jars loaded. did watch video on how install itext 7? error message tells you didn't include io jar. assumption have added kernel , layout jar classpath, overlooked adding io jar. these of documented dependencies in before start: installing itext 7 section of jump-start tutorial:

How to draw Line with rounded corners in Android xml drawables -

i want draw line in xml rounded corners.i not getting how create that.i want use line seekbar . want give rounded corners line rectangle. <?xml version="1.0" encoding="utf-8"?><layer-list xmlns:android="http://schemas.android.com/apk/res/android"> <item android:id="@android:id/background"> <shape android:shape="line"> <stroke android:width="5dp" android:color="#7b7878" /> </shape> </item> <item android:id="@android:id/progress"> <clip> <shape android:shape="line"> <stroke android:width="5dp" android:color="#ff0000" /> </shape> </clip> </item> you can this //seek_bar.xml <?xml version="1.0" encoding="utf-8"?> <layer-list xmlns:android=&qu

ios - CAKeyframeAnimation doesn't animate after exporting video -

i have big problem cakeyframeanimation. there function create selected animation after selected user. data in prepared dictionary. there code: //prepare settings let settings = datamanager.getfreeeffectssettingsforfilename("") //set origin let freeeffectorigin = settings.objectforkey("freeeffectorigin") as! [string: nsnumber] let xorigin: nsnumber = freeeffectorigin["x"]! nsnumber let yorigin: nsnumber = freeeffectorigin["y"]! nsnumber //set size let freeeffectsize = settings.objectforkey("freeeffectsize") as! [string: nsnumber] let widthsize: nsnumber = freeeffectsize["width"]! nsnumber let heightsize: nsnumber = freeeffectsize["height"]! nsnumber //set frame origin , size freeeffectanimationimage = uiimageview(frame: cgrectmake(cgfloat(xorigin), cgfloat(yorigin), cgfloat(widthsize), cgfloat(heightsize)))

gnupg - Git signed commits - How to suppress "You need a passphrase to unlock the secret key..." -

i changed global git configuration sign commits. use gpg-agent don't have type password every time. now every time make new commit see following 5 lines printed console: [blank line] need passphrase unlock secret key user: "john doe <mail@gmail.com>" 2048-bit rsa key, id abcdef12, created 2016-01-01 [blank line] even worse, when simple stash, message printed twice , needlessly filling console (i assume 1 each of 2 commit objects created). is there way suppress output? this more gpg configuration issue git one. since using agent, workaround add no-tty gpg.conf . echo 'no-tty' >> ~/.gnupg/gpg.conf (this seems working better --batch option )

c++ - Why does this operator overloading work? -

this question has answer here: default copy constructor 3 answers i trying learn c++ oop concepts through online tutorial encountered code snippet illustrating operator overloading. the code shown below: class myclass{ int var; public: myclass(int value=0){ var = value; } myclass operator+(myclass &obj){ myclass newobj; newobj.var = this->var + obj.var; return newobj; } }; suppose call operator in main function so: int main(){ ... obj3 = obj2 + obj1; ... } during earlier tutorials on classes, read why copy constructors require parameters passed reference since definition of how copy 2 class objects. so, far understand, copy constructors must when 1 has copy objects of class. in above code snippet, appears me compiler try "copy" values of newobj onto l_value in main() function (obj3). how possible without c

Entity Framework ASP.NET CRUD -

i have student page , student insert, delete, update. have page course course insert, delete, update.now want student assign courses. clear? should see in page?can me? you can add hyperlink on student page called "assign courses" or similar: <asp:gridview id="gvstudents" runat="server" autogeneratecolumns="false"> <columns> <asp:boundfield datafield="name" /> <asp:boundfield datafield="surname" /> <asp:hyperlinkfield datanavigateurlfields="name,surname,id" datanavigateurlformatstring="assigncourses.aspx?name={0}&surname={1}&id={2}" text="assigncourses" /> </columns> </asp:gridview> clicking on hyperlink take user new page called assigncourses.aspx , pass through name,surname , id(or other field like) in query string. on assigncourses.aspx write code display li

How to set no height for a widget in Android Studio? -

i learning android development , i'm trying make simple calculator. having problems layout of calculator. in opinion, clunky post whole xml code, i'm going post snippets matter in opinion. i made vertical linearlayout top-most parent, has 2 children, horizontal linearlayout, (which consists of textview shows input , button tells calculate) , gridlayout, 0-9 buttons , operators. the problem is, grid layout 4x4 grid buttons , when want set first row of buttons, each button needs layout_height, can't left empty , if set it's value match_parent, button alone fill whole screen. so how can solve problem layout_height, there workaround or better make multiple linearlayouts grid? if have additional questions, feel free ask can explain. here children linearlayout , gridlayout xml code: <linearlayout android:layout_width="match_parent" android:layout_height="60dp" android:layout_weight="1" android:background="@co

node.js - Making xampp and node(socket.io) work together -

i have little web app applies angularjs , php functions , queries database(xampp's apache , mysql). want apply simple chat in web app , not know how configure nor ports , on. following similar http://socket.io/get-started/chat/ i have index.js such var app = require('express')(); var http = require('http').server(app); var io = require('socket.io')(http); app.get('/', function(req, res){ res.sendfile(__dirname + '/index.html'); }); io.on('connection', function(socket){ console.log('a user connected'); socket.on('disconnect', function(){ console.log('user disconnected'); }); }); http.listen(443, function(){ console.log('listening on *:443'); }); i trying port 443 , 80, doesnt seem work (xampp shows 80 , 443, no idea how ports work) my js file has var socket = io(); in browser console , i'm getting socket.io-1.2.0.js:2 http://localhost/socket.io/?io=3&tran