Posts

Showing posts from June, 2012

Fill cell array with consecutive numbers in Matlab -

given mycellarray{10,3} = []; , fill in first column consecutive numbers (let's 1 through 10). know this: [mycellarray{1:10,1}] = deal(1,2,3,4,5,6,7,8,9,10) mycellarray = [ 1] [] [] [ 2] [] [] [ 3] [] [] [ 4] [] [] [ 5] [] [] [ 6] [] [] [ 7] [] [] [ 8] [] [] [ 9] [] [] [10] [] [] however, if cell array larger (say 1,000 rows rather 10), writing out comma-separated values becomes tedious: [mycellarray{1:10,1}] = deal(1,2,3, ... ,1000) is there way create comma-separated "list" of numbers automatically? (1:10) ? know assign values via loops, there elegant one-line solution or close that? this 1 way num2cell - mycellarray(:,1) = num2cell(1:size(mycellarray,1)) in place of num2cell , can use mat2cell might not elegant though - mat2cell([1:size(mycellarray,1)]',ones(1,size(mycellarray,1)),1)

twitter bootstrap - Having a difficult time understanding indentation for HAML -

i've been trying learn haml putting simple middleman app, keep running syntax error. i'm using bootstrap theme , followed video tutorial, seems i'm running "illegal nesting" problems. .container .jumbotron %blockquote %p lorem ipsum dolor sit amet, consectetur adipiscing elit. integer posuere erat ante. %small famous in %cite{:title => "source title"} source title "haml::syntaxerror @ / illegal nesting: content can't both given on same line %p , nested within it." i've been messing around try , understand how identation works, have no clue. can make blockquote show if dont have container. advice please! .container .jumbotron %blockquote %p lorem ipsum dolor sit amet, consectetur adipiscing elit. integer posuere erat ante. %small famous in %cite{:title => "source title"} source

c# to f# - C# event handler assignment (in CocosSharp), translation to F# -

i trying translate c# code please f#, learning cocossharp ( http://developer.xamarin.com/guides/cross-platform/game_development/cocossharp/first_game/part3/ ). have mistakes either in defining handletouchesmoved or assigning touchlistener or both. c# code: touchlistener = new cceventlistenertouchallatonce (); touchlistener.ontouchesmoved = handletouchesmoved; addeventlistener (touchlistener, this); and handletouchesmoved: void handletouchesmoved (system.collections.generic.list touches, ccevent touchevent) { //... } my faulty f# code (just relevant piece within gamescene class): type gamescene (mainwindow: ccwindow) x = inherit ccscene (mainwindow) let touchlistener = new cceventlistenertouchallatonce () // problem happen touchlistener.ontouchesmoved <- x.handletouchesmoved x.addeventlistener (touchlistener, x) member x.handletouchesmoved (touches: collections.generic.list<cctouch>, touchevent: ccevent) =

Did "float: center" ever work in CSS? -

i have seen "float: center;" in code have inherited. was there ever time (or place) did something? or original coder wrong? no there not property called center float. has property float: none; (the element not floated, , displayed occurs in text) float:left (the element floats left) float:right (the element floats right) float:initial (sets property default value) float:inherit (inherits property parent element)

android - How can i write these items for constructor in a for-loop? -

so i'm writing app android, , im still noob in java/android. anyways have 2 strings, 1 names , other emails, , want output them in listview custom adapter. works fine far dont know how set items dynamically (with loop). create adapter , on, used tutorial: http://www.ezzylearning.com/tutorial/customizing-android-listview-items-with-custom-arrayadapter i changed imageview second textview. in tutorials code there 5 items added list, need them dynamically, since im not having same amount of name+emails output i tried putting in for-loop doing: weather weather_data[] = new weather[names.length]; for(int z=0; z == names.length){ weather[z]={new weather(names[z], emails[z])}; } i tried adding "new" infront , trying set null before, trial&error since dont know it. so can tell me how add items dynamically? (ps: sorry if used wrong names describe anything) this should work weather weather_data[] = new weather[names.length]; for(int z=0; z <

php - Find prefix cms in mysql DB -

i want prefix db of cms. make code, not work when if in db more cms(joomla, opencart, wordpress) or make backup. can access prefix more gracefully? $this->connectdb(); $result = mysql_query("show tables;"); while($row = mysql_fetch_row($result)){ $allrows[] = $row[0]; } $index = preg_grep("/^.+_user$/", $allrows); $pieces = explode("_", array_pop($index)); $this->_prefix=$pieces[0]."_" ; try follow $this->connectdb(); $result = mysql_query("show tables;"); while($row = mysql_fetch_row($result)){ $allrows[] = $row; } $index = preg_grep("/^.+_user$/", $allrows); $pieces = explode("_", array_pop($index)); $this->_prefix=$pieces[0]."_"

php 5.5 - How to clear memory after file_get_contents executes in php -

i trying add variables couple of files have content. i using file_get_contents copy contents of particular file , using file_put_contents paste variable values along existing contents file. the problem that, on first instance works second file pastes has been stored in memory. puts contents first file along contents of second file. is there way can clear memory before next file_get_contents executes. or concept false here. here code... <?php if ($_post["submit"]) { $ip = $_post['ip']; $subnet = $_post['subnet']; $gateway = $_post['gateway']; $hostname = $_post['hostname']; $domain = $_post['domain']; $netbios = $_post['netbios']; $password = $_post['password']; $ipfile = 'one.txt'; $file = fopen($ipfile, "r"); $ipfilecontents = fread($file, filesize($ipfile)); $ipcontent = "ip='$ip'\n"; $ipcontent .= "netmask=

sql server - SQL Select Statement with If Else -

i have following sql statement below want increase discount 30 %, 40%, 50%, 60%, 70%, 80%, 90% instead of 20% if price on 1000. if price on 1000, the discount level increased 20%. if discount applied 10%, 10% increased 20%. 20% of 10% 2%, , on 1000 price therefore discounted @ 12%. if price above 440 less 1000, apply standard discount in table. if price 440 or below, no discount applied. select itemid, title, round( if(price >= 1000, price * (100 - ($price_discounts * 1.2))/100, if(price < 1000 , price > 440, price * (100 - $price_discounts) /100, price)) ,2) saleprice, price alldata;

dom - How can I change the text using JavaScript -

this question has answer here: how change text of span element in javascript 8 answers <div class="baseprice">$99.99</div> i want change value $99.99 using javascript. i tried using getelementbyclass didn't produce results hoping get. document.getelementsbyclass returns nodelist , kind of array. you have specify element (there's 1 here, i'm assuming first) you're looking for, , can use .textcontent change text of node. document.getelementsbyclassname("baseprice")[0].textcontent = "$49.99"; document.getelementsbyclassname("baseprice")[0].textcontent = "$49.99"; <div class="baseprice">$99.99</div>

python - Check if string contains list item -

i have following script check if string contains list item: word = ['one', 'two', 'three'] string = 'my favorite number two' if any(word_item in string.split() word_item in word): print 'string contains word word list: %s' % (word_item) this works, i'm trying print list item(s) string contains. doing wrong? the problem you're using if statement instead of for statement, print runs (at most) once (if @ least 1 word matches), , @ point, any has run through whole loop. this easiest way want: words = ['one', 'two', 'three'] string = 'my favorite number two' word in words: if word in string.split(): print('string contains word word list: %s' % (word)) if want functional reason, this: for word in filter(string.split().__contains__, words): print('string contains word word list: %s' % (word)) since bound answer per

angularjs - How hide options in select list angular? -

there object: 0 : { id : 1, value : 2}, 1 : { id : 2, value : 3} and select list: <select id="sec"> <option value="1"></option> <option value="1"></option> <option value="3"></option> </select> how hide option in id="sec" after click option id = 2 first select. so, show only: <option value="1"></option> <option value="1"></option> i tried add ng-model="selectlist" ng-change(selectlist) selected value. how compare seleted value object , hide options second select? my own solution is: <?= form_dropdown('specialization', $speccategory['name'], array(), 'ng-model="specialization"');?> <select ng-model="doctors" name="doctor"> <option ng-show="specialization == {{value.usersspecializationidspecialization}}" value="{{value.u

java - Send a private message from a user account to another user inbox with Rest FB -

is there anyway send private message account user inbox using rest fb? the thing is, @ first, i'm receiving messages inbox different users( not friends), , i'm taking these messages & saving them database, along every sender id. then, want send specific link each correspondent user in private message. is possible using rest fb ? there's no such implementation. no it's not possible.

ios - How do I vertically center a UIImageView in a UIScrollView programmatically? -

i have view controller puts uiimageview inside uiview wrapper put uiscrollview . need image zoomed out , centered vertically. the view controller instantiated , presented within 600x600 uipopovercontroller . this code have view controller: - (void) loadview { uiimageview *imageview = [[uiimageview alloc]initwithimage:self.image]; uiscrollview *scrollview = [[uiscrollview alloc] initwithframe:imageview.frame]; scrollview.delegate = self; scrollview.bounces = no; self.containerview = [[uiview alloc] initwithframe:imageview.frame]; [self.containerview addsubview:imageview]; [scrollview addsubview:self.containerview]; scrollview.minimumzoomscale = .4; scrollview.maximumzoomscale = 5.0; [scrollview setzoomscale:.4]; self.view = scrollview; } - (uiview *)viewforzoominginscrollview:(uiscrollview *)scrollview { return self.containerview; } i've tried bunch of things center it, appears @ top of scroll view. use

javascript - Facebook Share callback not working -

i'm trying setup facebook page-tab app contains share button. works fine enough present share dialog, callback isn't being called. if put fb.ui function inside window.fbasyncinit function, callback works great. but, doing makes share window appear on page load. i'd have show on button click. i've tried calling window.fbasyncinit function after button clicked, doesn't work either. here's full html of page: <html> <head> </head> <body style="background-color:#9ec64e;"> <div id="fb-root"></div> <table style="width:100%"> <tr><td> <br> <h1>press button share</h1> </td> <td> <p id="enterbutton"><a href='' onclick="showshare();"><img src='share_btn.png' style='width:

arrays - how to sort my output alphabetically java -

i'm trying read 2 txt files 1 jumbled , 1 dictionary file match ones same letters. when words have 3 combinations doesn't come out alphabetically. what fix this? import java.io.*; import java.util.*; public class project6 { public static void main( string args[] ) throws exception { if (args.length<2) {system.out.println( "must pass name of 2 input files on cmd line. (dictionary.txt, jumbles.txt)"); system.exit(0); } long starttime = system.currenttimemillis(); // clicking start on stopwatch int maxdictwords = 180000; //has fixed length data structure... not familiar array list , faster. int maxjumblewords = 100; bufferedreader dictfile = new bufferedreader( new filereader(args[0]) ); bufferedreader jumblesfile = new bufferedreader( new filereader(args[1]) ); string[] dictionary = new string[maxdictwords]; // save dictionary txt array st

python 3.x - How does this code work? What tells it to stop printing after the third row? Can someone break it down for me, in the most dumbed down way possible? -

import random def main(): printmatrix(3) i don't understand how code stops after third row def printmatrix(n): in range(1, n + 1): j in range(1, n + 1): print(random.randint(0, 1), end = " ") print() main() range(1,n+1) builtin returns [1, 2, 3], iterating on range(1, n+1) same iterating on [1, 2, 3] - each loop body executes 3 times before terminating. inner 1 prints entries horizontally , outer 1 causes inner 1 execute 3 times.

rally - Is there a way to apply a filter to a treestore that includes a property that does not exist on one of the models specified? -

i trying populate treegrid user stories , defects, 1 of parameters use in filter property not exist on defect model. if filter includes property, no results returned. there workaround or special filter definition? the treegrid/treestore request data artifact wsapi endpoint. there hidden queryable field called typedefoid can use limit filter specific type, so: ((typedefoid != <defecttypedefoid>) or ((typedefoid = <defecttypedefoid>) , (defectfield = "value"))) you can obtain defecttypedefoid model once treestore built: var defecttypedefoid = treestoremodel.getartifactcomponentmodel('defect').typedefoid; you can see example of in action in iterationtrackingboardapp here: https://github.com/rallyapps/app-catalog/blob/master/src/apps/iterationtrackingboard/iterationtrackingboardapp.js#l227 that example story, similar. below in code more complicated defect specific filter example.

smalltalk - how to stream a collection backwards without copies? -

i know how stream collection backwards without copies in pharo/squeak. for example, stream #(1 2 3) stream next returns 3 , 2 , 1 . know use collection reversed readstream , reversed copies. you use generator: | coll stream | coll := #(1 2 3). stream := generator on: [:g | coll reversedo: [:ea | g yield: ea]]. stream next generators let wrap streaming interface around piece of code, basically.

asp.net mvc - EF6 OnModelCreating() event doesnt -

i following along tutorial on ef6 , codefirst. http://www.asp.net/mvc/overview/getting-started/getting-started-with-ef-using-mvc/creating-an-entity-framework-data-model-for-an-asp-net-mvc-application i started solution , added models, contexts , initializer namespace testcontoso.dal { public class schoolcontext : dbcontext { public schoolcontext() : base("name=schoolcontextdb") { } public dbset<student> students { get; set; } public dbset<enrollment> enrollments { get; set; } public dbset<course> courses { get; set; } protected override void onmodelcreating(dbmodelbuilder modelbuilder) { modelbuilder.conventions.remove<pluralizingtablenameconvention>(); } } } and created dummy home controller , index view. namespace testcontoso.controllers { public class homecontroller : controller { private schoolco

java - Runtime delegation of unknown method calls -

background consider objects alice , bob , , eve . in smalltalk, alice can send message bob bob delegates eve, without bob knowing name of method delegate (see smalltalk delegation of unknown method call ). problem java can partially emulate smalltalk's behaviour coding alice like: public void methodname() { object bob = new bob(); try { ((bobinterface)bob).methodname(); } catch( classcastexception e ) { ((bobinterface)bob).doesnotunderstand( new method( name ) ); } } this captures intent, verbose , repetitious (being codified once per method). can impractical if code generated. java 8 introduces lambda expressions (see so answer ). question how codify bob such method invocations bob not implement passed alice eve via bob? for example, variation of following should display received alice's message! : public class alice { public static void main( string args[] ) { bob bob = new bob(); // problematic line... bob.listen();

mysqldump - Mysql max_allowed_packet -

i'm having troubles setting mysql (mariadb running on centos7) when issue show global variables variable_name = 'max_allowed_packet'; the response +--------------------+---------+ | variable_name | value | +--------------------+---------+ | max_allowed_packet | 1048576 | +--------------------+---------+ 1 row in set (0.00 sec) witch means 1m. need leave permanently value @ 5m or bigger tried editing file /etc/my.cnf adding [mysqldump] max_allowed_packet=16m so remained this. [mysqld] datadir=/var/lib/mysql socket=/var/lib/mysql/mysql.sock # disabling symbolic-links recommended prevent assorted security risks symbolic-links=0 # settings user , group ignored when systemd used. # if need run mysqld under different user or group, # customize systemd unit file mariadb according # instructions in http://fedoraproject.org/wiki/systemd [mysqldump] max_allowed_packet=16m [mysqld_safe] log-error=/var/log/mariadb/mariadb.log pid-file=/var/run/mari

matplotlib - IPython: save inline graphics to a file? -

now question has been asked , answered numerous times before, i've tried answers (except, seem, correct one), no success. i'm running ipython inline graphics, having used command ipython qtconsole --matplotlib inline& within linux (ubuntu 14.04) start it. , want save graphics file. example: import numpy np import matplotlib.pyplot plt x = np.arange(0,2*np.pi,0.1) plt.plot(x,np.sin(x)) plt.savefig('myplot.png') however, file generated empty. i've tried entering plt.ioff() but has no effect: plot displayed inline anyway. i'm not quite sure whether issue python, ipython, matplotlib, qt, or else... i can non-inline graphics; if start with ipython qtconsole --matplotlib qt& but inline graphics. possible save inline graphics in ipython? you can save ipython notebook html menu, saves pictures separately you: file -> download -> html

c - Numbers of collision in a hash table -

i'm doing hash table store elements in range: 2000000-20000000 of values. examples: 17664658-8,7587458-8,7338375-4,5741259-2..... in sample of 100000 elements number of collisions 23939 , in sample of 1000000 elements number of collisions 439870. don't know hash tables, numbers of collisions not little high? i read in controlled range of numbers can have hash function uniform , not know how or start , advice ? this hash fuction. int hash(char* clave,int m) { //m size of table (about double of elements stored) int number=0,i=0; /// while(isdigit(clave[i])){ //i don't use last 2 characters. number+=(clave[i++]-'0'); if(isdigit(clave[i])) number*=10; } /// mutiplication method float dis,r; r=0.6106154; dis = r*(number) - floor(r*(number)); int result = (int)(dis*m); return result; } no, number of collisions not high, in fa

Python : Remove duplicate elements in lists and sublists; and remove full sublist if duplicate -

is there function or way achieve recursively in python 2.7 ? input : ['and', ['or', 'p', '-r', 'p'], ['or', '-q', '-r', 'p']] output : ['and', ['or', 'p', '-r'], ['or', '-q', '-r', 'p']] remove duplicate 'p' in sublist1 duplicate input : ['and', ['or', 'p', '-r', 'p'], ['or', '-q', '-r', 'p'], ['or', 'p', '-r', 'p']] output : ['and', ['or', 'p', '-r'], ['or', '-q', '-r', 'p']] remove duplicate 'p' in sublist1 duplicate remove sublist3 duplicate of sublist1 thanks i think have create custom remove duplicate function inorder preserve order of sublists.try this: def rem_dup(lis): y, s = [], set() t in lis: w = tuple(sorted(t)) if isi

javascript - populate text boxes depend on drop-down selection in php -

i research in google , stack overflow answer there lot of answer cannot able want. i have 2 drop down menus , 3 text boxes. php code : <select onchange="firstdropdownclick()"> </select> script code : <script type="text/javascript"> function firstdropdownclick() { var selectdwn = document.getelementbyid("id_dwn"); var selectedvalue = selectdwn.options[selectbox.selectedindex].value; } in "firstdropdownclick()" want codes following : 1.select data database according selected value. 2.fill text boxes that. 3.fill second drop down according value of first drop-down menu. i need example codes. because stuck , dont know how . thanks in advance. your html code <select name="reg_number" id="reg_number"> <option value="1">reg1</option> <option value="2">reg2</

python - Two conditions in single line for loop -

i have function has return statement follows: x = 0 return{ 'restaurantlist' : [restaurant.serializegeneral(myarray[x]) restaurant in self.restaurantlist], 'success' : self.success } i need increment x every time for loop runs, however, can't seem syntax right. you can use enumerate function both index , value each restaurant in list follows: return { 'restaurantlist' : [restaurant.serializegeneral(myarray[x]) x, restaurant in enumerate(self.restaurantlist)], 'success' : self.success } you should compute list outside of list comprehension because line way long readable.

javascript - How can I require modules with patterns in the path? -

how can include files in nodejs like require('./packages/city/model/cities') require('./packages/state/model/states') require('./packages/country/model/countries') like require('./packages/*/model/*') same grunt loading files. you can't (or @ least shouldn't) in order this, have overload node's native require function, highly inadvisable. the commonjs pattern might seem tedious you, it's 1 , shouldn't try break because saw shortcuts in other languages/frameworks. by introducing form of magic in module, change programmers can (and should able to) safely assume commonjs pattern itself.

ruby - Best matching between two arrays using fuzzy string matching -

i need way find best matching between 2 arrays. array a contains product names array b refers same products names may differ slightly. a = [ "f542521376-34-reg", "af7u", "af106u", "f521521376-30r" ] b = [ "f54252137634r", "af7u", "af106u", "f52152137630r" ] best matching: "f542521376-34-reg" - "f54252137634r" "af7u" - "af7u" "af106u" - "af106u" "f521521376-30r" - "f52152137630r" or: a[0] - b[0] a[1] - b[1] a[2] - b[2] a[3] - b[3] (the first , last elements varied between lists.) i can use fuzzy string matching algorithm numerical value string similarity (0.0-1.0). alone wont me best possible matching of list elements. i've not found algorithm , don't want brute force it. the actual application is, have middle-man ruby code translates info

c++ - Delete matches in OpenCV (Keypoints and descriptors) -

i want check scene image against 2 train images. that, detect features , compute descriptors of both training images. before detecting, computing , matching scene image, delete matches of train1 , train2. because these matches won't facilitate matching of scene image train1 , train2. so, match train1 train2 , vector of matches trainidx , queryidx. how can delete these matches in keypoints-vector , descriptor matrix of train1 , train2? best regards, dwi i have done below: std::vector<cv::keypoint> keypoints[2]; cv::mat descriptor[2]; std::vector< cv::dmatch > matches; /* write code generate keypoints, descriptors , matches here... keypoint[0] -> train image 1 keypoints keypoint[1] -> train image 2 keypoints descriptor[0] -> train image 1 descriptors descriptor[1] -> train image 2 descriptors matches -> matched between train image 1 , 2 */ // logic keep unmatched keypoints , corresponding descriptor

java - Calling a function from MainActivity, from a class which is in a different module -

i have single activity called mainactivity. has function has called class in different module public class mainactivity extends activity { @override protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.activity_main); } @override public boolean oncreateoptionsmenu(menu menu) { // inflate menu; adds items action bar if present. getmenuinflater().inflate(r.menu.menu_main, menu); return true; } public void tag_proc(string s1) { system.out.println("working guess"+s1) } } this function has called class module public class newcls { mainacitivity mact= new mainactivity(); public void dothis() { string s="new"; mact.tag_proc(s); } } this cannnot done because in different modules. best , easy solution this. if interface solution, how best use it not clear want achieve never this: mainacitivity mact= new maina

Laravel 5 domPDF PAGE_NUM and PAGE_COUNT -

i implemented success dompdf ( barryvdh-dompdf wrapper laravel ) in laravel 5 project. the report rendering fine, unable add pdf report parameters (like in codeigniter): page_num, page_count, date , other stuff in header or footer of report. do have solutions issue? my code in laravel 5: $data['company'] = company::find($company_id)->name; $dompdf = pdf::loadview('admin.inputs.report',$data)->setpaper('a4'); in codeigniter simple insert header: $canvas = $this->dompdf->get_canvas(); $font = font_metrics::get_font("helvetica", "bold"); $canvas->page_text(36, 18, "page: {page_num} {page_count}", $font, 6, array(0,0,0)); return $dompdf->stream('invoice.pdf'); enable php in dompdf (version: 0.6.*, dompdf ) change dompdf_enable_php true in dompdf.php config (file path: "...\vendor\barryvdh\laravel-dompdf\config"). add lines pdf view: <script type=&q

ios - AMAttributedHighlightLabel not working properly in UITable View? -

i have use amattributedhighlightlabel show "#"hashtag , "@"mention name clickable amattributedhighlightlabel work in uitable view. call touchesbegan method not found word. not fire delegate method. table label image link link third party custom label amattributedhighlightlabel code - (void)touchesbegan:(nsset *)touches withevent:(uievent *)event { uitouch *touch = [[event alltouches] anyobject]; cgpoint touchlocation = [touch locationinview:self]; int count = [touchablelocations count]; (int i=0; < count; i++) { if (cgrectcontainspoint([[touchablelocations objectatindex:i] cgrectvalue], touchlocation)) { nsmutableattributedstring *newattrstring = [self.attributedtext mutablecopy]; [newattrstring removeattribute:nsforegroundcolorattributename range:[[touchablewordsrange objectatindex:i] rangevalue]]; nsstring *string = [touchablewords objectatindex:i]; if([string ha

php - Ajax image using jquery form.js -

i working piece of code. here using jquery, jquery form.js , , jqueryui. task upload image in upload folder , store path of image along position set users (jqueryui draggable used this). works fine. don't know how works. can explain me how grabbing dragged position set users , how whole thing working together. if need see php script can share thattoo. thanks $(document).ready(function () { /* uploading profile background image */ $('body').on('change', '#bgphotoimg', function () { $("#bgimageform").ajaxform({ target: '#timelinebackground', beforesubmit: function () {}, success: function () { $("#timelineshade").hide(); $("#bgimageform").hide(); }, error: function () { } }).submit(); }); /* banner position drag */ $("body").on('mouseover', '.headerimage

java - jsp bean cannot find any information on property -

i can try write jsp javabean . receive error message eclipse console : cannot find information on property 'uomo' in bean of type 'conta.contagenere' . think wrote well, there don't know or can't see! run in eclipse server inside eclipse . i have 3 files: form, jsp , java. , web.xml. form_13_6.html <!doctype html> <html> <head> <meta charset="iso-8859-1"> <title>inserisci dati...</title> </head> <body> <form action="http://127.0.0.1:8080/esercizio_13_x/benvenuto3" method="post"> <p> nome: <input type="text" name="nome" ><br> cognome: <input type="text" name="cognome" ><br> sesso: <input type="radio" name="sesso" value="maschio">maschio<input type="radio" name="ses

filesystems - How to edit file system of partition? -

root@milenko-hp-compaq-6830s:/home/milenko# parted -l model: ata fujitsu mhz2250b (scsi) disk /dev/sda: 250gb sector size (logical/physical): 512b/512b partition table: msdos number start end size type file system flags 1 1049kb 248gb 248gb primary ext4 boot 2 248gb 250gb 2140mb extended 5 248gb 250gb 2140mb logical linux-swap(v1) number 2 extended type.what should create file system ext4? you have ext4 file system on partition #1. , not need change #2 ext4 until not know doing. partition #3 logical partition inside extended partition #2. it's linux swap partition. use fdisk utility manage partitions , mkfs build file systems.

My Android App doesn't list on Google play store on some Samsung Phones? -

i have read through other questions on published app not showing in results on phones. none has helped solve peculiar case. my manifest has: <uses-permission android:name="android.permission.internet"/> <uses-sdk android:minsdkversion="19" android:targetsdkversion="19"/> problem: app doesn't show in google pay store search results on samsung note-2 & note-3 shows on samsung note-4 (strange!!). app lists in search on other phones like: lg, htc etc in google play store. q. minsdkversion/targetsdkversion matter? thanks i don't know version phone's have example if minsdkversion 19 isn't going work on phones below api version 19 note 2/3.

c# - async on page load in xamarin.forms -

i'm developping small application based on master detail template. 1 of pages requires data loaded immediatly, , dont know how this. in every example, data loaded once user press button. here current code : string test = async (sender, e) => { task<string> json = getrandomrelations (); return await json; }; and method public async task<string> getrandomrelations () { var client = new system.net.http.httpclient (); client.baseaddress = new uri("http://127.0.0.1/loltools/web/app_dev.php/api/relation/"); string response = await client.getstringasync("random/20"); return response; } i'm trying json response, cannot manage that... main problem cannot convert lambda expression string... thanks ! i'm not absolutely sure trying what's wrong simply: string test = await getrandomrelations ();

unix - SIGALRM blocked by a mask -

i have doubt happens when sigalrm signal gets blocked, go pending state , delivered after unblocked or lost? the sigalrm held pending, , delivered unblocked. a blocked signal (sig_block) remains pending until is: delivered , being unblocked , having either default (sig_dfl or "uncaught") disposition or user-supplied ("caught") disposition, struct sigaction 's sa_handler . accepted , sigwait , sigwaitinfo , or sigtimedwait , meaning removed set of pending signals without further action discarded , changing disposition sig_ign ("ignored"). ignored signals will not held pending in case conventional unix signals typically not queue, 1 signal of given type may pending @ time, , subsequently generated signals of same type lost. (as aside, implementation chooses order of signal delivery , acceptance, example, delivering or accepting lower-numbered signals before higher-numbered signals. means newly unblocked sigalrm might not delive

android - How to Sort ArrayList according to another list -

i making cab booking application..in sending push notification on driver side...i want send pushnotification driver have done minimum jobs..... have 2 lists...one getting jobs column database , second getting objectids database objectids in string , jobs in integers.... i have sorted list of jobs(integers) in ascending order using collections.sort(jobs); but want objectids list sorted according jobs list... for example: this jobs list before sorting: [11 , 23 , 1 , 5 , 8] this objectids list : [rx3sh3bwo4 , p9m1hnwo7l , 71k6akjoo3 , yjlhp0zkkg , 5uffhyiwlk] when sort jobs list [1,5,8,11,23] but want object ids related 1 in 0 index of objectids list... how sort list objectids comparing jobs list???? use hashmap , add key objectid , values jobid ( or vice versa per requirements) and if want sorting can use arraylist

angularjs - Ionic: Passing array elements between controllers -

i have controller & view computes , displays specific element. when click button on view, want open shows more information item. what best way pass element controller display? many thanks you build service data 1 controller , passing other, so: .factory('sharedata', function(){ var finaldata; return { senddata: function(data) { finaldata = data; }, getdata: function() { return finaldata; } } }); another option have create shared varraible in main controller('app' controller in ionic) .controller('app', function($scope){ $scope.data; }) .controller('app.controller1', function($scope){ $scope.data = "hello world"; }) .controller('app.controller2', function($scope){ console.log($scope.data); //hello world });

javascript - How to use different colors of Circles using JSON -

i have script adds circles on map, data have been taken json. want add 2 types of circles: first circles getting property 'jstores' , red color second circles getting property 'jcarrera' , blue color. only last type in json has 'jcarrera' property. could tell me please how in correct way. the code below: <!doctype html> <html> <head> <title>jewellery distribution, presence</title> <style> html, body, #map-canvas { margin: 0; padding: 0; height: 100%; } </style> <script src="https://maps.googleapis.com/maps/api/js"></script> <div id="legend"> jewellery distribution, boutiques </div> <style> #legend { font-family: arial, sans-serif; background: #fff; padding: 10px; margin: 10px; border: 2px solid #000; } </style> <script> var map; var infowindow = new google.maps.infowindow({}); function initialize() { var