Posts

Showing posts from July, 2013

meteorite - What does "Running Meteor from a checkout" as seen in meteor (mrt) console output actually mean? -

i have started getting following message - seems work don't know why im getting / means app. thing can think of smart-package im using looking older version of meteor, , mrt clever enough not use meteor version break it? stand while meteorite thing done installing smart packages ok, everything's ready. here comes meteor! => running meteor checkout -- overrides project version (0.6.2) the thing i'm pretty sure want running on 0.6.2 not overriding other version. so mean really? - , need not it. thanks i'm not sure why uses odd terminology. version 0.6.0 introduced project versions, each project run own version of meteor similar how meteorite smart.json what running meteor checkout -- overrides project version (0.6.2) means version overridden version in smart.json. typically latest version on master branch on github (which checked out hence wording). @ moment if ran mrt use 0.6.2.1 i'm sure on time meteorite folded m

javascript - how to hide user id and other parameters in a jsp url? -

i have url using users access jsp web application http:/testerpages.com/testpage/menu1?userid=27 how can hide userid=27 users , show url like http://testerpages.com/testpage/menu1 is there method can hide parameters users or can ignore ids there threat security if show id parameters in url directly front end users i m calling page using <a href="#" onclick="gotourl('${param.userid}','${contextpath}/menu1?userid=')">menu1</a> hex(aes_encrypt(userid,'"key"')) use in sql or mysql query aes encrypt userid made use of in mysql should solve problem

queue - Beanstalkd / Pheanstalk - Cant get it working at all! (WAMP/PHP/LARAVEL) -

so im trying pheanstalk queue working in laravel 4, built in (i had composer instal beanstalkd lib). now thats done... im trying send jobs workers. everytime error [2013-04-25 08:55:03] log.error: exception 'symfony\component\debug\exception\fatalerrorexception' message 'error: maximum execution time of 30 seconds exceeded in c:\wamp\www\adam\l4\vendor\pda\pheanstalk\classes\pheanstalk\socket\streamfunctions.php line 55' in c:\wamp\www\adam\l4\vendor\pda\pheanstalk\classes\pheanstalk\socket\streamfunctions.php:55 stack trace: #0 c:\wamp\www\adam\l4\bootstrap\compiled.php(5006): symfony\component\debug\errorhandler->handlefatal() #1 [internal function]: illuminate\exception\exceptionserviceprovider->illuminate\exception\{closure}() #2 {main} [] [] i error in log: exception 'errorexception' message 'catchable fatal error: argument 1 passed illuminate\queue\jobs\job::resolveandfire() must of type array, null given which seems looped run '

Resize buttons of a Spinbox -

is there way resize buttons used in spinboxwidget (tkinter)? i'm trying build touchscreen optimized gui. couldn't find suitable option in docs maybe there other way or didn't see option. thank help! i don't know way access spinbox buttons, can use control widget tkinter.tix : import tkinter.tix tix root = tix.tk() c = tix.control(root) c.pack() decr = c.subwidget('decr') incr = c.subwidget('incr') decr['height'] = incr['height'] = 100 decr['width'] = incr['width'] = 100 root.mainloop()

could not initialize class com.mysql.jdbc.driver Caused by: java.security.AccessControlException: access denied -

Image
am new hibernate, created project(google web application project) of eclips , hibernate config file .. "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd"> <hibernate-configuration> <session-factory name=""> <property name="hibernate.connection.driver_class">com.mysql.jdbc.driver</property> <property name="hibernate.connection.url">jdbc:mysql://localhost:3306/test</property> <property name="hibernate.connection.username">root</property> <property name="hibernate.dialect">org.hibernate.dialect.mysqldialect</property> <property name="hibernate.hbm2ddl.auto">create</property> <property name="hibernate.show_sql">true</property> <mapping class="com.model.userdetails" /> </session-factory> </hibernate-configuration> and hibernate code access data

android - Translate animation with image view not getting position properly -

i have few issues in code: 1.i'm using getx(), gety() position of imageview in relative layout. correct method positions? 2.translate animate doesn't stop exact location.(i.e) crosses image view(destination) 3.if animation ends particular position want set background image position how can achieve that? is logic wrong in continuous animation? used in animation end method.. please provide suggestions. i'm beginner.this small game i'm developing. here xml , java code <?xml version="1.0" encoding="utf-8"?> <relativelayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:gravity="center_vertical" > <imageview android:id="@+id/player4" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignparentbottom=&q

android - Change icon actionbar depending on the profile selected -

Image
i trying implement profilesactivity in app. so, imagine, in home activity/layout: usersactivity, have done addactions init actionbar like: intent addprofilesintent = new intent(this, profilesactivity.class); action profilesaction = (action) new intentaction(this, addprofilesintent, r.drawable.go_profiles); actionbar.addaction(profilesaction); we click on profile's icon on our actionbar , opens new layout (profiles_menu.xml) have listview checkables items , image each profile (differents profiles: work, home, auxiliary...). listview list = (listview) findviewbyid(r.id.list); arraylist<hashmap<string, object>> listdata=new arraylist<hashmap<string,object>>(); string []name={" company number"," home number"," handy number"," auxiliary number"}; for(int i=0;i<4;i++){ hashmap<string, object> map=new hashmap<string, object>(); map.put("number_image&q

ios ui automation - iOS code coverage for UIAutomation functional tests -

i want generate code coverage files our ios app. the problem when build code test coverage settings builds , simulator launches app. want run uiautomation functional tests, kick off tests using instruments command, simulator restarts! for code coverage files generated, app must not restart. has found way yet use running simulator execute uiautomation tests? you may able find ideas previous question is there way test code coverage of uiautomation tests?

problems with create tab - android -

i need menu 3 tabs. i have following android code, works: tabhost = gettabhost(); tabspec newactivity = tabhost.newtabspec("a"); intent intent = new intent(this,a.class); intent.putextra("name", name); intent.putextra("age", string.valueof(age)); newactivity.setindicator("a", getresources().getdrawable(r.drawable.a)) .setcontent(intent); tabhost.addtab(createtab(b.class, home_tab_id, "b", r.drawable.h)); tabhost.addtab(newactivity); tabhost.addtab(createtab(c, more_tab_id, "c", r.drawable.c)); class b , class c: import android.app.activity; public class b extends activity{ } why middle tab has different color compared first , last tab? i need 3 tabs same. need middle tab have same color - shape first , third one?

objective c - Regular Expression for validate price in decimal -

i unable find workaround regular expression input price in decimal. want:- 12345 12345.1 12345.12 12345.123 .123 0.123 i want restrict digits. i created 1 not validating assumed ^([0-9]{1,5}|([0-9]{1,5}\.([0-9]{1,3})))$ also want know how above expression different one ^([0-9]{1,5}|([0-9].([0-9]{1,3})))$ thats working fine. anyone explanation. "i using nsregularexpression - objective c" if helps answer more precisely - (ibaction)btntapped { nsregularexpression * regex = [nsregularexpression regularexpressionwithpattern: @"^\\d{1,5}([.]\\d{1,3})?|[.]\\d{1,3}$" options:nsregularexpressioncaseinsensitive error:&error]; if ([regex numberofmatchesinstring:txtinput.text options:0 range:nsmakerange(0, [txtinput.text length])]) nslog(@"matched : %@",txtinput.text); else nslog(@"not matched : %@",txtinput.text); } "i doing in buttontap method". this sim

javascript - Sorting JSON contents by Category -

i have json file setup this: { "products": [ { "name": "pink floyd", "album": "the best of pink floyd: foot in door", "label": "emi uk", "tracks":"hey you, see emily play, happiest days of our lives, brick in wall (part 2), have cigar, wish here, time, great gig in sky, money, comfortably numb, high hopes, learning fly, fletcher memorial home, shine on crazy diamond, brain damage, eclipse" , "price": "16.40", "genre": "rock" , "source": "http://upload.wikimedia.org/wikipedia/en/thumb/3/38/afootinthedoorpinkfloyd.jpg/220px-afootinthedoorpinkfloyd.jpg", "quantity": 10 }, { "name": "depeche mode", "album": "a question of time", "la

qt - QxtLogger (From libQxt) prints its Messages in Application Output -

i using qxtlogger (from libqxt) logging in our application. working fine qt 4.7.3. i updated qt 4.8 , since log messages qxtlogger getting printed in application output. didn't installed qtmessagehandler, not able point out exact cause. any pointer or solution helpful..

c# - DateTime with same amounts of days for each month -

is there easy way or ready go class having datetime every month has same amount of days? i'm writing calculation tool resource planning , use standard month, no leap years etc. update: ok maybe should have mentioned little big detail - tried going 365/12 = 30,42days/month. can't see happening run trouble when example trying days ticks (division , 1.999999999 etc). in financial markets, there lot of ways of counting numbers of days in year, number of days in month, etc. particular way called "day count convention", see e.g. the wikipedia article on day count conventions . 1 type of day count conventions tries you're talking about, namely have 30 days in each month. these day count conventions called 30/360, , can see wikipedia page there several variations on this. these conventions straightforward implement, suggestion choose 1 of these day count conventions , code yourself.

infinity - What is the `norm` in matlab? -

i came norm function in matlab, , checked documentation, wasn't clear me. can clarify does? moreover, when selecting inf , which, based on documentations "returns infinity norm ", mean? a norm raises each value power, adds them takes root (the value-th root). may recognise 2 norm distance between 2 points calculations data: 2,3,5 2 norm: square root(2^2 + 3^2 + 5^2) 3 norm: cube root(2^3 + 3^3 + 5^3) 4 norm: 4th root(2^4 + 3^4 + 5^4) etc etc etc interestingly: 99999 norm = 99999th root(2^99999 + 3^99999 + 5^99999) approximately equals 5 (the largest value) so: infinity norm= infinityth root(2^infinity + 3^infinity + 5^infinity)=5 basically infinity norm ends being largest value

Getting error while doing api call and android app is crash -

i new android, m trying api call php , have done 1 example it, work on computer fine same app package gives error in eclipse on laptop. public void postdata() { // create new httpclient , post header httpclient httpclient = new defaulthttpclient(); httppost httppost = new httppost("http://www.yoursite.com/script.php"); try { // add data list<namevaluepair> namevaluepairs = new arraylist<namevaluepair>(2); namevaluepairs.add(new basicnamevaluepair("id", "12345")); namevaluepairs.add(new basicnamevaluepair("stringdata", "hi")); httppost.setentity(new urlencodedformentity(namevaluepairs)); // execute http post request httpresponse response = httpclient.execute(httppost); } catch (clientprotocolexception e) { // todo auto-generated catch block } catch (ioexception e) { // todo auto-generated catch block } } ` hear erro

Wordpress - display 3 related posts regardless of the post type, custom or otherwise -

i'm trying display 3 posts below single post view (i have custom post types set want query work on single post pages regardless of post type). however code below don't related posts displayed. when removed . '&exclude=' . $current 3 related posts display current post being 1 of them. hence why added 'exclude' don't see why not displaying when add in. any appreciate. thanks <?php $backup = $post; $current = $post->id; //current page id global $post; $thispost = get_post_type(); //current custom post $myposts = get_posts('numberposts=3&order=desc&orderby=id&post_type=' . $thispost . '&exclude=' . $current); $check = count($myposts); if ($check > 1 ) { ?> <h1 id="recent">related</h1> <div id="related" class="group"> <ul class="group"> <?php foreach($myposts $post) : setup_postdata($post); ?&

asp.net - Why is controller thread is blocked if I use the session? -

i have pretty simple controller: public class homecontroller : controller { public actionresult index() { session["somedata"] = "123"; return view(); } [httppost] public actionresult longtest() { thread.sleep(5000); return json(new { text = datetime.now.tostring("hh:mm:ss.fff") + " - longtest"}); } [httppost] public actionresult cantanswer() { return json(new { text = datetime.now.tostring("hh:mm:ss.fff") + " - cantanswer"}); } } i use these methods client's side way: <script type="text/javascript"> $(document).ready(function () { $('#btnlongoperation').click(function () { $.post("/home/longtest", null, function (data) { $('#result').text(data.text); }, "json

null - no return value of call procedure mysql -

i have procedure in mysql , has 4 parameters input , 3 parameters of output , 1 param of output doesn't return nothing (null). delimiter $$ drop procedure if exists `cierremes`$$ create procedure cierremes (in tarjeta varchar(100),in bancobus varchar(100),in mes int,in anyo int, out total int, out nulas int, out erroneas int) begin declare stockactual int default 0; declare cantidad int; /*declare xcantidad,xnulas,xerroneas int;*/ declare entrada, salida int default 0; declare total int default 0; select stock stockactual almacen idproducto = (select idproducto productos productos.banco = bancobus , productos.plastico = tarjeta); call entradassalidas(tarjeta,bancobus,mes,anyo,@ent,@sal); set entrada = @ent; set salida = @sal; call obtenermovimientosmes(tarjeta,bancobus,mes,anyo,@cant,@nul,@err); set cantidad = @cant; set nulas = @nul; set erroneas = @err; set total =(stockactual + entrad

vb6 - Fast Listview Loading -

the question simple 1 , many of know listview slower if hidden. there suggestions like: loading partial data , load on scrolling, though default there no scroll event load partial data , provide button load more (say 50) records load partial data, show screen , use timer load remaining data what other suggestions? how lockwindowupdate work? equal listview.visible = false ? can 2 or more listviews locked using api? edit hyperlist looks great use complicated, can 1 please simplify or explain going on @ caller's end i.e. how fill array. the obvious solution here cross between of mentioned; paging. load set number , allow user page backward , forward using numbered page sequence above or below listview control. to speed further don't use active recordset ; instead, load data array , directly drop information control. use alternative form if want edit information rather editing in listview control. alternatively create own listview equivalent

IBM Cognos Report Studio: Expression Builder Syntax -

i working report studio , need create few expressions cross-tab query. attempting group orders age groups (for rows in cross-tab). build these groups trying create expression following: select [sql5].[outbound_order_id], [sql5].[priority] [sql5].[outbound_order_line_id] =1 , [sql5].[age] <= 2 although works in sql platforms, cognos not validating expression. while ibm has lot of material calculations, have been unable locate syntax examples. can experience in report studio provide syntax example perform expression such above? in advance. what's validation error get? appears forgot part select [sql5].[outbound_order_id], [sql5].[priority] [sql5] [sql5].[outbound_order_line_id] =1 , [sql5].[age] <= 2

javascript - How to change labels on the control button in NVD3? -

here problem: on nvd3 charts, there options "stacked" or "grouped" radio buttons. what change label of these buttons. i'm french, have "groupé" in place of "grouped" , "empilé" in place of "stacked". don't know if i'm clear? is possible? took in different js files "legend", tooltips"... wasn't helpful (for javascript , nvd3 newbie am...). thank's answers! the strings labels unfortunately hardcoded in source (in respective file in models/ ), have change source. generated control elements text have no specific id or class such selecting , changing them dynamically not option. your best bet change source. search javascript files strings want change.

windows - Running cmd with spaces from java -

i want run command through java session. command contains spaces. "c:\with space\sample.exe" -command_option "c:\source file\test.c" works if c:\withoutspace\sample.exe -command_option "c:\source file\test.c" if keep quotes in c:\with space\sample.exe error :'the filename, directory name, or volume label syntax incorrect.' , if remove quotes exe not run... please guide. thanks, try this: string[] arg = {"cmd","/c","c:/source file/test.c"}; processbuilder pb = new processbuilder(arg); process pr = pb.start(); also, can use runtime.exec(string[]) version example: runtime rt = runtime.getruntime(); string[] args = { "cmd", "/c", "c:/source file/test.c"}; try { process proc = rt.exec(processcommand); }

java - Find the class that waste the Memory -

Image
i've published app several months ago in google play, of user have strong problem memory usage of app , true, because when checked memory usage "running application" tab, see take 80~110mb of memory, below picture: to find class/activity or pieces of code cause problem found mat (memory analysis tools) plugin useful it's make me confused, please take account following image: the total size of used memory 9.8mb "running application" tab show me 80mb @ same time! the other problem histogram, shallow heap of byte[] object high. is normal? when debug google project, byte value high! so how can find using memory? when android application starts, inherits objects allocated zygote - trick make application spawning faster. when memory dump show own. the answer why zygote has memory allocation trick make resource loading faster. during android boot up, zygote preloads list of classes , resources other application doesn't nee

c# - PayPal DoReferenceTransaction -

i'm calling process doreferencetransaction (soap) c#. runs fine, data arrived , result in doreferencetransactionresponsetype has no errors. details doreferencetransactionresponsedetails ever null. is anywhere variable enable details response filled? found xml-string in doreferencetransactionresponsedetails.any why should exclude data xml if in doreferencetransactionresponsedetails ? what must have transactionid paypal. thanks example of request: request = new doreferencetransactionreq(); request.doreferencetransactionrequest = new doreferencetransactionrequesttype(); request.doreferencetransactionrequest.version = "98.0"; request.doreferencetransactionrequest.doreferencetransactionrequestdetails = new doreferencetransactionrequestdetailstype(); request.doreferencetransactionrequest.doreferencetransactionrequestdetails.paymentaction = paymentactioncodetype.sale; request.doreferencetransactionrequest.doreferencetransactionrequestdetails.payme

ios - How to get rate this app link to your iPhone App -

this question has answer here: how link apps on app store 20 answers i making simple iphone app. need link rate app. not getting how link. can me solve issue? you can use this nsstring *rateappurl = @"itms-apps://itunes.apple.com/webobjects/mzstore.woa/wa/viewcontentsuserreviews?id=apple_id&onlylatestversion=true&pagenumber=0&sortordering=1&type=purple+software"; [[uiapplication sharedapplication] openurl:[nsurl urlwithstring:rateappurl]]; you can apple_id itunesconnect. you need go application information application identifier apple id provided. hope helps you.

ruby on rails - How to access response of ajax request, fired by clicking on a link? -

i have link, clicking on ajax post request fired up. this: $('a#create_object').click(); this fires ajax request. code ( $.ajax({...}) ) written somewhere in bootstrap libs , not want edit thwem. how access response of request after ajax successes? the direct callbacks deprecated since jquery 1.8.0, can use .done, .fail , .always callbacks ! and have overwrite / access callbacks if want stuff, cannot access external mean ! $('#link').on('click', function(e) { $.ajax({ type: "post", url: "your-page", data: {}, datatype: "json" }).done(function (response) { alert('success'); console.log(response); // use here }).fail(function (response) { alert('fail'); console.log(response); // use here }).always(function (response) { // here manage every-time, when it's done or failed. }); });

asp.net mvc - Hidden Field VS Database Call -

i have query joins many tables (and time consuming) , returns data view. later want pass data view view. know can use form hidden fields pass data, or re-query database in controller of second view. i wondering if there "preferred" way of doing far efficiency , performance concerned. better pass data view controller using hidden fields? or better re-query database in controller data? hidden fields pretty always faster database hit. should leverage use of them when can, re-querying database 1 of main benefits of using hidden fields.

Automatically prepend std:: to cout, etc. in Visual Studio for C++ and Eclipse -

edit: added "and eclipse" title , body pf question. need in both places. i know "thou shalt not "using"" in c++ so... how might add tool (enable existing tool) in ms visual studio 2008 (vc++) and/or eclipse juno allow me type cout , press space bar, or maybe < , have editor replace cout std::cout . can extend std:: items? can such tool recognize cout in "code" space , not in "comment" space or "quoted string" space? you can add using namespace std; top of file, after #include s, implicitly add std:: . text of code not change (that is, compiler won't go , textually pre-pend std:: everywhere) know in std namespace symbols can't find elsewhere.

vbscript - Escape and replace quotations in VBS -

i need escape character " replacing in vbs i write str=8505usafromto^1c0"ma str = replace(str,chr(34),"""") but seems " not escape string str please, what's wrong , me fix that? thanks string literals need double quotes: str = "8505usafromto^1c0 ma" to escape double quote in string literal, use "" (double double quotes) str = "8505usafromto^1c0""ma" it makes no sense replace double quotes (chr(34)) in string double quotes (""""). update : if .readall()/.readline() string file , want change " in string, use str = replace(str, """", "that's want see instead of each double quote") in case want "" (double double quotes) replacements, need """""" (2 delimiters , 2 times 2 double quotes).

html - How to change the position of my JavaScript game on the home page -

<!doctype html> <html> <head> <title> snake! </title> <link rel="stylesheet" type="text/css" href="style.css"></link> <body> <meta charset="utf-8"> <title>snake!</title> <div id="game"> <script src="snake.js" type="text/javascript"></script> </div> </body> </head> </html> i have created javascript game above, appears in top left corner of page. have css page style home page, need in html page , in css page move game different position on page? update: css page looks this: body{ background-image:url(nokiaphone.jpg); background-repeat:no-repeat; background-position: center top; } #game{ position:absolute; left:1000px; top:150px; } a "correct" html page <html> <head> <meta charset="utf-8">

php - MPDF - large table -

i generating table mpdf, larger 1 page (about 4-8 pages) , have problem, rows separated on own pages. how join them 1 big table? i had same problem colspan . i had 2 columns header colspan = 3 . when put colspan = 2 , problem resolved.

Customizing android DialogFragment -

iam beginner level programmer in android.now iam after small app development , have dialogfragment.everything working , displaying dialog box also.but have difficulties color scheme. have changed background color of layout , title bar color remains same white , title text color blue , blue line under that(need change green).how can achieve this? please me here fragment code public class clientinfofrag extends dialogfragment { public clientinfofrag() { } @override public view oncreateview(layoutinflater inflater, viewgroup container, bundle savedinstancestate) { view view = inflater.inflate(r.layout.clientinfolayout, container); getdialog().settitle("client info"); return view; } } thank you since using .settitle() method setting title defualt settings, such white background. if want customize title background color need have xml that. also, dialogfragments, knowledge , experience, should use public dialog oncreatedialog instead

asp.net web api - Azure Worker role Webapi hosting + Service Bus -

i able pump messages azure service bus , dispatch them webapi controllers in worker role. have seen excellent (series) article http://pfelix.wordpress.com/2012/03/15/asp-net-web-api-creating-an-host-using-azure-service-bus/ interesting seems use wcf . prefer use newer webapi framework instead. has wrapped queueclient source custom host? the post refer use newer web api framework. internally, uses wcf relay bindings happens web api self-hosting, uses wcf internally. the code available here: https://github.com/pmhsfelix/webapi.explorations.servicebusrelayhost hope helps pedro

random - simple way to randomly subset a raster in R -

i work in r. have raster (raster_entrop). want automatically generate random subset of raster. issue extent not rectangular , want subsets completly enclosed in extent. solution check if there not "nan" (corresponding pixel outside extent of raster_entrop) in coordinate of "subextent" randomly chosen inside extent of original raster. ext<-extent(raster_entrop) repeat{ rnd.x<-runif(1,ext@xmin, ext@xmax) rnd.y<-runif(1,ext@ymin, ext@ymax) #test if sub extent within "big extent" test<-is.na(extract(raster_entrop, cbind(rnd.x,rnd.y)))+ is.na(extract(raster_entrop, cbind(rnd.x,rnd.y+0.02)))+ is.na(extract(raster_entrop, cbind(rnd.x+(0.02),rnd.y)))+ is.na(extract(raster_entrop, cbind(rnd.x+(0.02),rnd.y+0.02))) if (test==0){ break } } ext_sub<-extent(c(rnd.x, rnd.x+0.02,rnd.y,rnd.y+0.02)) raster_entrop_sub <- crop(raster_entrop, ext_sub) my question: there simpler solution not use loop ?

Load xml into mysql using values from another table -

i have mysql database want populate xml data want information change depending on value in table. the xml file looks follows: d<datarow num="1"> <film_date>20/04/2013</film_date> <film_name>days of thunder</film_name> <film_revenue>100</ film_revenue > d<datarow num="2"> <film_date>21/04/2013</film_date> <film_name>top gun</film_name> <film_revenue>120</ film_revenue > d<datarow num="3"> <film_date>20/04/2013</film_date> <film_name> mission impossible </film_name> <film_revenue>100</ film_revenue > for instance want load xml file film titles , dates film details table load xml local infile ‘c:\film_details.xml table film details i don’t want load film name table film details rather use id table called film titles +----+--------------------+ | id | film name | +----+--------------------+ | 1 | vanilla

nfc - DESfire EV1 AES authentication no reply -

i'm trying authenticate desfire ev1 card, card doesn't reply. before trying authenticate, i've formatted card , created new application, selected new application , need authenticate before creating file. here's communcation format fail: format card start on bsp_mifare --> 0b 01 90 fc 00 00 00 (tranceive, 56 bits) bsp_mifare <-- fa 01 01 (24 bits) bsp_mifare --> fa 01 01 (tranceive, 24 bits) bsp_mifare <-- fa 01 01 (24 bits) bsp_mifare --> fa 01 01 (tranceive, 24 bits) bsp_mifare <-- fa 01 01 (24 bits) bsp_mifare --> fa 01 01 (tranceive, 24 bits) bsp_mifare <-- fa 01 01 (24 bits) bsp_mifare --> fa 01 01 (tranceive, 24 bits) bsp_mifare <-- fa 01 01 (24 bits) bsp_mifare --> fa 01 01 (tranceive, 24 bits) bsp_mifare <-- 0b 01 91 00 (32 bits) bsp_mifare --> 0a 01 90 0a 00 00 01 00 00 (tranceive, 72 bits) bsp_mifare <-- 0a 01 ad 51 73 29 dc 6e 33 cf 91 af (96 bits) bsp_mifare --> 0b 01 90 af 00 00 10 2e 4a 13 9c a9 d4 23 61

ios - UISlider customization: how to properly add shadow to custom knob image -

Image
i need place custom knob image shadow uislider. far have image of 38x38, of there region defines shadow of knob. now while using image, when slide knob extreme ends actual knob not able cover end points, hence end points visible under transparent region of knob image this code using customize uislider uiimage *slidebtimg = [uiimage imagenamed:sliderknobimg]; [self.ratingslider setthumbimage:slidebtimg forstate:uicontrolstatenormal]; [self.ratingslider setthumbimage:slidebtimg forstate:uicontrolstatehighlighted]; how can implement custom knob shadow beneath it, covering end points?? look inside uislider.h , there methods let customize slider knob , track needed. (ios 2.0 , above) // lets subclass lay out track , thumb needed - (cgrect)minimumvalueimagerectforbounds:(cgrect)bounds; - (cgrect)maximumvalueimagerectforbounds:(cgrect)bounds; - (cgrect)trackrectforbounds:(cgrect)bounds; - (cgrect)thumbrectforbounds:(cgrect)bounds trackrect:(cgrect)rect value:

Web config error with two databases in asp.net -

i develop website , there 2 databases in web site. made 2 database , users in plesk panel , upload ups, database first name database_journal , database name 2 database_general , users userid1 , userid. there thing wrong in , gave me error: a network-related or instance-specific error occurred while establishing connection sql server. server not found or not accessible. verify instance name correct , sql server configured allow remote connections. (provider: named pipes provider, error: 40 - not open connection sql server) my web config this: <add name="dbconn" connectionstring="password==******;; persist security info=true;user id=userid1; initial catalog=database_general; data source=***.**.**.**" providername="system.data.sqlclient" /> <remove name="localsqlserver"/> <add name="localsqlserver" connectionstring="password=******;persist security info=true;user id=userid1; initial catal

pagination - How do I use a Kendo UI grid with server side paging and search form? -

i have kendo ui grid. grid built not displayed on page until search form submitted , response returned server. response result in large number of rows (depending on search parameters), serverpaging set true. the transport property in datasource object set. for example: $('#resultsgrid').kendogrid({ datasource: { pagesize : 10, serverpaging: true, schema : { total: 'total' }, transport : { read: {url: '../search.x'} } } /*... more options*/ }); however, ajax call (to ../search.x) made server when pages loads. how can have ajax call made when search form submitted , prevent being called when page loads? also, how can have transport read call server original post parameters of search form when next/previous page of results requested? set autobind false in grid initialization. documentation here autobind boolean(default: true) if set fals

matlab - how to retrieve original matrix from RGB image? -

in matlab, how retrieve original matrix rgb image? case, have 50x360 matrix. after imagesc, save jpeg file. , now, need load matrix(50x360) jpeg file. there anyway it? if use imread, matrix dimension 1366x628x3 different 50x360. thanks. like this: im = imread('image.jpg') size(im) ycoord = 20; xcoord = 20; im(ycoord,xcoord,1) %for r im(ycoord,xcoord,2) %for g im(ycoord,xcoord,2) %for b

spring data jpa - QueryDSL, java.lang.NoSuchMethodError: com.mysema.query.jpa.JPQLQuery.from([Lcom/mysema/query/types/EntityPath;)Lcom/mysema/query/jpa/JPQLCommonQuery; -

trying query dsl (version 3.1.1) , spring data jpa (version 1.3.1.release) , running.. my problem error message ... java.lang.nosuchmethoderror: com.mysema.query.jpa.jpqlquery.from([lcom/mysema/query/types/entitypath;)lcom/mysema/query/jpa/jpqlcommonquery; @ org.springframework.data.jpa.repository.support.querydsl.createquery(querydsl.java:88) @ org.springframework.data.jpa.repository.support.querydsljparepository.createquery(querydslj parepository.java:131) seems version compatibility conflict. version of querydsl should use spring data jpa 1.3.1.release? i hoping find answer here couldn't see used. but version of querydsl should use spring data jpa 1.3.1.release? querydsl 2.9

java - Simple undirected unlabelled graph in JGraphT doesn't work? What is the edgeClass parameter? -

i want make simple undirected unlabelled (edges aren't labelled) graph a<->b in jgrapht 0.8.3: import org.jgrapht.graph.defaultedge; import org.jgrapht.graph.simplegraph; class { public static void main(string[] args) { simplegraph<string, string> sg = new simplegraph<string, string>(string.class); sg.addvertex("a"); sg.addvertex("b"); sg.addedge("a", "b"); system.out.println("edges of a: " + sg.edgesof("a")); system.out.println("edges of b: " + sg.edgesof("b")); } } i output: $ java -cp 'jgrapht-jdk1.6.jar:.' edges of a: [] edges of b: [] why sets of edges of vertices a , b empty? class parameter of simplegraph for? seems type of edges, since edges here unlabelled, surely doesn't matter? graph classes seem take class of edge ( edgeclass ) parameter. can't find in documentation edgeclas

assembly - Fast Division on GCC/ARM -

as far know compilers fast division multiplying , bit shifting right. instance, if check this thread says when ask microsoft compiler division 10 multiply dividend 0x1999999a (which 2^32/10) , divide result 2^32 (using 32 shifts right). so far good. once tested same division 10 on arm using gcc, though, compiler did different. first multiplied dividend 0x66666667 (2^34/10), divided result 2^34. far it's same microsoft, except using higher multiplier. after that, however, subtracted (dividend/2^31) result. my question : why on arm version there's subtraction? can give me numeric example without subtraction result wrong? if want check generated code, it's below (with comments): ldr r2, [r7, #4] @--this loads dividend memory r2 movw r3, #:lower16:1717986919 @--moves lower 16 bits of constant movt r3, #:upper16:1717986919 @--moves upper 16 bits of constant smull r1, r3, r3, r2 @--multiply long, put lower 32 bits in r1,

java - displaying Unicode text from database to JTextArea -

i have database has text in multiple languages english, hindi, telugu, tamil, marathi. english , hindi text displayed perfectly. when choose other languages telugu, tamil, shows square boxes. jtextarea txtmessage = new jtextarea(); txtmessage.setlinewrap( true ); txtmessage.setwrapstyleword( true ); jscrollpane scrollpane = new jscrollpane(txtmessage); scrollpane.setbounds(93, 125, 226, 97); frame.getcontentpane().add(scrollpane); lang = cblanguage.getselecteditem().tostring(); string sql2 = "select message messages language = '"+lang+"';"; try { result = statement.executequery(sql2); while(result.next()){ txtmessage.settext(result.getstring(1)); } } catch (sqlexception e) { // todo auto-generated catch block e.printstacktrace(); } how make display tamil , telugu fonts properly?

php - CodeIgniter 2.x Back-end and Front-end management -

i saw many threads, articles , clever posts concerning layouts both backend , frontend approach on same website. i hear feedbacks (pros , cons) each type of introduced front/backend management had real experience codeigniter: controller-separated section ./web/system/... ./web/application /application/controllers/* (config/controllers/hooks/models/views...) /application/controllers/admin/* (config/controllers/hooks/models/views...) application type of cms ./web/system/... ./web/front/* (config/controllers/hooks/models/views...) ./web/admin/* (config/controllers/hooks/models/views...) sub-application ./web/system/... ./web/application /application/admin/controllers/* (config/controllers/hooks/models/views...) /application/front/controllers/* (config/controllers/hooks/models/views...) thanks suggestions , tips. what did our application create structure so: the application folder divided 3 subfolders backend frontend common this helped

php - How to get proper title from RSS feed? -

i have feed: https://www.facebook.com/feeds/page.php?format=rss20&id=172360026392 with title example: no nie wiary! maraton warszawski & #x2013; ki the space between & , # intentional, in rss there no space. how convert string pure utf-8 & #x2013; become "-" character? use html_entity_decode function: http://www.php.net/manual/en/function.html-entity-decode.php

php - SQL Buddy , mySQL Error for LOAD DATA LOCAL INFILE -

i trying import csv file mysql database. query giving error. query : load data local infile ‘/last.csv’ table punjab fields terminated ‘,’ enclosed ‘”‘ lines terminated ‘\r\n’ (newpoll, blockcode, halqa, pollnumber, pollstation, sex, area); and error you have error in sql syntax; check manual corresponds mysql server version right syntax use near '‘/last.csv’ table punjab fields terminated ‘,’ enclosed ‘�' @ line 1 any ideas ?? thanks you have used http://www.whereismyballot.com ;) way, shouldn't have quoted field names

php - How to upgrade from mysql_* to mysqli_*? -

i'm using deprecated code data users, follows: /* retrieve */ $lastname = $_post['lastname']; $firstname = $_post['firstname']; $examlevel=$_post['level']; /* connect */ $dbc=mysql_connect("localhost", "user", "passw") or die('error connecting mysql server'); mysql_select_db("db") or die('error selecting database.'); /* sanitize */ $lastname=mysql_real_escape_string($lastname); $firstname=mysql_real_escape_string($firstname); $examlevel=mysql_real_escape_string($examlevel); /* insert */ $query_personal = "insert personal (lastname, firstname) values ('$lastname', '$firstname')"; $query_exam = "insert exam (level, centre, backupcentre, etc.) values ('$examlevel', '$centre', '$backup', 'etc')"; this working keep coming across warnings security , lack of support. there's small rewrite connect mysqli instead of mysql m

c# - How to get Multicast working in VirtualBox Guest OS on OSX -

im tearing hair out trying multicast work under virtual box osx host , win7 guests. multicast code in general works fine on real network of windows7 machines need able develop away it. i read possible vb creating additional interfaces , 1 of them getting multicast packets couldnt repeat it, wrote below code try deal still fails in vb under internalnetwork or hostonly. do need physically wired network (not wifi) work? or still doing else wrong? edit: simplified code somewhat, still doesn't work. networkinterface[] nics = networkinterface.getallnetworkinterfaces(); // netowrk info int defaultport = 5050; string localname = dns.gethostname(); iphostentry hostentry = new iphostentry(); hostentry = dns.gethostbyname(localname); ipaddress localaddress = hostentry.addresslist[0]; // create socket pair every interafce for(int i=0;i<nics.length;i++) { #region make outgoing socket on interface if (!nics[i].supportsmulticast) { continue; // skip 1 }