Posts

Showing posts from March, 2011

serialization - WCF Polymorphism in service contract -

i trying create service operation accepts, parameter, object implements specific interface. have thought easy accomplish, running problems (what guessing serialization problems not certain). have following contract: //unsustainable because need method each of (currently) //3 student types, plus have 2 more root categories have multiple subtypes public interface iemailtemplateaccess { [faultcontract(typeof(validationfault))] [faultcontract(typeof(errorresponse))] [operationcontract] [transactionflow(transactionflowoption.allowed)] templateresponse getstudenttemplate(itemplaterequest request); } and like: public interface iemailtemplateaccess { [faultcontract(typeof(validationfault))] [faultcontract(typeof(errorresponse))] [operationcontract] [transactionflow(transactionflowoption.allowed)] templateresponse gettemplate(itemplaterequest request); } in service use abstract factory return correct template based on type of request comes

c++ - no matching function for call to 'fscanf' -

i'm trying read time file example (12:00 a) need read in 3 parts. here have. #include <iostream> #include <fstream> #include <stdio.h> using namespace std; int main() { string name, filename; ifstream inputfile; cout << "what name of file provessed "; cin >> filename; inputfile.open(filename.c_str()); getline(inputfile, name); fscanf (inputfile, "%d:%d %c", &starth, &startm, &startap); fscanf (inputfile, "%d:%d %c", &endh, &endm, &endap); inputfile >> payrate; i'm getting error title , i'm not sure i'm doing wrong. function fscanf standard c function declared in header <cstdio> following way (i show how function declared in header <stdio.h> in c. in fact same declaration except keyword restrict used in c++) int fscanf(file * restrict stream, const char * restrict format, ...); as can see there no parameter o

ruby on rails - ActiveAdmin login page -

i'm working first rails app activeadmin , i'm working on incorporating devise authentication mechanism. when user not authenticated, it's redirecting default devise login page. i want default active admin login page , feel same. problem i'm not seeing active admin login page. such page exist? looking @ rails cast: http://railscasts.com/episodes/284-active-admin?view=asciicast show login page @ localhost:3000/admin/login , gives me 404. does know if there activeadmin login page , how can use it? $ rake routes prefix verb uri pattern controller#action root / admin/dashboard#index new_user_session /users/sign_in(.:format) devise/sessions#new user_session post /users/sign_in(.:format) devise/sessions#create destroy_user_session delete /users/sign_out(.:format) devise/sessions#de

java - Spring Android Twitter Callback URL -

Image
i need implement oauth login in android application using twitter api. found great project on github ( spring-android-samples ) example, have problem respect parameter "callback url". when submit login , password, android application opens browser instance (with callback url) rather processing response in background: has had implement similar , me please? thank you! you don't have register x-android-org-springsource-twitterclient://twitter-oauth-response url twitter app settings. in fact, callback url configured on twitter doesn't matter in case. callback url sent twitter within request fetch oauth request token. note within androidmanifest.xml there specified <intent-filter> twitterweboauthactivity configures callback url. filter tells android redirect requests activity. <activity android:name=".twitterweboauthactivity" android:excludefromrecents="true" android:nohistory="true" > &l

java - writable collection questions -

Image
when reading book of hadoop, definitive guide , found following paragraph. seems me code segment marked yellow example scenario marked green. i not clear why have super(text.class); , , part of code shows “set type statically” , marked red. the problem, , 1 of worst things hadoop, everything (input , output formats, keys, values, mappers, reducers, combiners, partitioners, comparators, ...) constructed using reflection, assumption provided class has 0-arg constructor. means can't use arraywritable class of key or value because there no 0-arg constructor hadoop can use instantiate key or value type. creating trivial subclass textarraywritable, 0-arg constructor, around annoying limitation. it's weird use of "statically"; constructor still setting element type @ runtime, though it's constant.

iphone - iOS Installation Error: ApplicationVerificationFailed -

Image
i have spent last 6hrs searching web bugs, have read , tried many suggested solutions , still couldn't fix problem. lets hope can point me right direction time. i using fdt build air app, can test using ios simulator, can package , deploy ituneconnect can't push iphone can test it. sure mobileprovision correct (i check xcode 5), app id correct, , p12 also. here log xcode console: mar 9 22:27:32 202-436-0338 installd[17] <notice>: 0x10050c000 mobileinstallationinstall_server: installing app com.abcd.bht mar 9 22:27:33 202-436-0338 installd[17] <error>: 0x10050c000 verify_signer_identity: misvalidatesignatureandcopyinfo failed /var/tmp/install_staging.wprl4j/foo_extracted/payload/bht.app/bht: 0xe8008015 mar 9 22:27:33 202-436-0338 installd[17] <error>: 0x10050c000 do_preflight_verification: not verify executable @ /var/tmp/install_staging.wprl4j/foo_extracted/payload/bht.app mar 9 22:27:33 202-436-0338 installd[17] <error>: 0x10050c000 insta

javascript - Backbone app POST request to database -

so have backbone app using rails 4 on backend. there 2 models, articles , publications. have post requests nested since need info comes publications post insert data object the articles post. when make post request articles controller send the following data object: url, publication_id , publication_name. reason when @ rails console @ articles created see url , publication_id populated not publication_name. code pasted here. ideas how publication_name show up? publications_index.js createfeed: function(e){ e.preventdefault(); var feed_url = $('#new_feed_name').val(); // var = this; this.collection.create( { url: feed_url }, { success: function(data){ var name = data.attributes.name; $.post('/articles/force_update', {url: feed_url, publication_id: data.id, publication_name: name}, function(data){ }); } } ); } schema.rb create_table "articles", force: true |t|

ruby on rails - extremely slow csv exporting -

we trying generate csv file users download. however, it's extremely slow, 5 minutes 10k lines of csv. any idea on improving? code below: def download_data start_date, end_date = get_start_end_date report_lines = @report.report_lines.where("report_time between (?) , (?)", start_date, end_date) csv_string = csv.generate |csv| report_lines.each |report_data| csv << [report_data.time, report_data.name, report_data.value] end end respond_to |format| format.csv { send_data(csv_string, :filename => "#{time.now}.csv", :type => "text/csv") } end end i start checking if report_time indexed, unindexed report_time going contribute slowness. refer active record migration details on adding index. second, trim down result need, i.e. instead of selecting columns, select time , name , , value : report_lines = @report.report_lines .where("report_time between (?) , (?)",

java - JavaFX2 StackOverflowError at ObservableListWrapper -

i trying use filter on text field. problem getting exception: java.lang.stackoverflowerror @ com.sun.javafx.collections.observablelistwrapper.size(observablelistwrapper.java:335) i can't understand why exception thrown, because had similar code , there no stackoverflowerror. think settext() calling listener again , again, why there no error on similar code did before? public static void addnumericfilter(final textfield tf) { tf.textproperty().addlistener(new changelistener<string>() { @override public void changed(observablevalue<? extends string> value, string oldvalue, string newvalue) { //system.out.println("text = " + tf.gettext()); system.out.println("value = " + value.getvalue()); system.out.println("oldvalue = " + oldvalue); system.out.println("newvalue = " + newvalue); try { integer.parseint(value.getvalue());

c++ - Why the response speed SNMP in window Server 2008 is so slow when disable internet card -

in vc++, call method: snmpmgrrequest(...) data other pc, when disable internet connection. tried run method in 2 different windows (windowxp , window server2008) only take 1 second in window xp response error data. but take 7 seconds in window server 2008 response error data. does know why there different response speed in windowxp , window server 2008? thank you.

c++ - abort() hanging indefinitely -

the code (my original code used assert , shorter sscce ) #include <cstdlib> int main() { abort(); return 0; } compiler version: $ g++ --version g++ (gcc) 4.8.0 copyright (c) 2013 free software foundation, inc. free software; see source copying conditions. there no warranty; not merchantability or fitness particular purpose. compiled with: $ g++ test.cpp -o test runtime: $ ./test hangs indefinitely. checking top notice abrt-hook-ccpp (as root) taking whole cpu (pegged @ 75%, ./test taking 25%). other notes: behaviour appears flaky, happening 80% of time. tried @ each level of optimization (o0 through o4) , had no differences. additionally cannot reproduce behaviour on local machine (g++ 4.8.1) it's bug in redhat's automatic bug reporting tool. try disabling abrt service , see if works. you can either disable abrt-ccpp: # chkconfig abrt-ccpp off # service abrt-ccpp stop or whole service: # chkconfig abrtd off # service

css - Installed fonts in Grails not working -

i want use font open sans on grails project, placed fonts in web-app directory under 'fonts' folder. afterwards, added css: body{ background-color: #ffffff; font-family: 'opensans', arial, sans-serif; font-size: 14px; } but still won't work. initially, used link href google fonts , placed in of main.gsp... didn't work. add following view or layout <link href='http://fonts.googleapis.com/css?family=open+sans' rel='stylesheet' type='text/css'> the google fonts api generate necessary browser-specific css use fonts. need add font name css styles. example: font-family: 'open sans', sans-serif; ref:- font not applied in web application

ios - How do I make a picker view populate from an array of NSStrings? How would I then access the value of the item picked? -

okay, need picker user can select list of predefined options. can give me easy, simplified version of how populate picker view array of nsstrings? then, how read value picker? i'm noticing things nameofpicker.value , nameofpicker.text not work here. thank you! i have read following documents , don't understand getting at. https://developer.apple.com/library/ios/documentation/userexperience/conceptual/uikituicatalog/uipickerview.html https://developer.apple.com/library/ios/documentation/general/conceptual/cocoaencyclopedia/delegatesanddatasources/delegatesanddatasources.html#//apple_ref/doc/uid/tp40010810-ch11 it quite similar how populate data in uitableview , setting datasource , delegate. 1. first step set delegate of picker view. in .m file set datasource , delegate @interface yourviewcontroller () <uipickerviewdatasource, uipickerviewdelegate> { } @property (strong, nonatomic) uipickerview *yourpickerview; 2. assign datasource , delegate

sprite kit - SpriteKit - method similar to getChildByName/getChildByTag in Cocos2d -

now started porting game cocos2d sprite-kit cocos2d not offers box2d physics , new version of cocos2d 3.0 has less features. got struct place while porting sprite-kit. there way child node parent in spritekit ? (ccsprite *)[self getchildbytag:2022]; //cocos2d syntax how can achieve in sprite-kit ? see apple documentation on sknode: – childnodewithname: – enumeratechildnodeswithname:usingblock: also see sknode's userdata property.

java - Eclipse Error: The refactoring does not change any source code -

Image
i have done 1 small coding in mainactivity.java , have create java in src folder in android eclipse not able i want create shown below so want create new class stackinfoactivity . i click on next after choosing android activity in menu menu i choose blank , hit next details entered , click on next button instead of creating class getting error have added unique details there problem eclipse need correct eclipse i clicked on finish button activity not created have colored image above please suggest me how correct , rid of error check if have older version of adt plug-in. you need update adt plug-in after updating sdk manager. not select "help->check updates" select "help->install new software..." , select adt site install newer version of adt plug-in. the recent version of adt plug-in 22.6.0.v201403010043-1049357 had same problem after upgrade sdk manager , adt-plugin 22.3 @ time. "check updates" tell me no update

itext - how to count characters overlapping on itextpdf columntext no_more_column -

i'm trying put text (chunk) columntext object longer text can fit in column.. function go() returns no_more_column excepted, how can remaining string not fitting in column? use autohyphenation on column.. code that: pdfcontentbyte bait=pdfw.getdirectcontent(); bait.savestate(); chunk c=new chunk(text, font); hyphenationauto h=new hyphenationauto("fi", "fi", 2, 2); c.sethyphenation(h); float rowheight=1.3f*font.getsize(); c.setlineheight(rowheight); columntext ct=new columntext(bait); ct.setsimplecolumn(100, 100, 300, 300); ct.setalignment(com.itextpdf.text.element.align_left); ct.addtext(c); int ret=ct.go(); i tried adding chars chunk , trying go() in loop long no_more_column happens, column output not right after that..

javascript - bootstrap popover positioning - not working -

Image
i have login , register link user can click , gets popover opened login. want popover bit shifted left hangs this: i on 15' screen laptop, far fine. if open in bigger resolution, looks this: i setting in js this: $('#profilepover').on('shown.bs.popover', function(){ $('.popover').css('left','774px'); }); how can make stick login link no matter how big screen is? instead of left use right : $('#profilepover').on('shown.bs.popover', function(){ $('.popover').css({right: '115px', left: 'auto'}); }); right position not change window resize. of course 115px example, adjust actual layout. need reset left position auto in case because default popover left 0.

javascript - How to Highlight a particular region in Google map when user clicks on it? -

i have page in using apis google display interactive map. using bubbles locate region. now want highlight region(state) when user clicks on bubble , display informations region. want show indian map (do not display other countries) for eg. when click on state gujarat, turn different color , display population in gujarat. i afraid, need state polygons implement highlight of states. https://gis.stackexchange.com/questions/14642/how-to-highlight-the-area-in-google-map-on-mouse-hover

caching - Centralized Cache failed in hadoop-2.3 -

i want use centralized cache in hadoop-2.3. here steps. (10 nodes, every node 6g memory) 1.my file(45m) cached [hadoop@master ~]$ hadoop fs -ls /input/pics/bundle found 1 items -rw-r--r-- 1 hadoop supergroup 47185920 2014-03-09 19:10 /input/pics/bundle/bundle.chq 2.create cache pool [hadoop@master ~]$ hdfs cacheadmin -addpool mypool -owner hadoop -group supergroup added cache pool mypool. [hadoop@master ~]$ hdfs cacheadmin -listpools -stats found 1 result. name owner group mode limit maxttl bytes_needed bytes_cached bytes_overlimit files_needed files_cached mypool hadoop supergroup rwxr-xr-x unlimited never 0 0 0 0 0 3.adddirective [hadoop@master ~]$ hdfs cacheadmin -adddirective -path /input/pics/bundle/bundle.chq -pool mypool -force -replication 3 added cache directive 2 4.listdirectives [hadoop@master ~]$ hdfs cacheadmin -listdirectives -stats -path /input/

php - Is it possible to use an Authsub token with Youtube Data API v3? -

i'm trying access youtube data api v3 old authsub youtube token (scope= http://gdata.youtube.com ) return me exception : (403) daily limit unauthenticated use exceeded. continued use requires signup. for information, i'm working php client lib. i need access api through token, possible?

ios - Pinterest Send Pin View How to create the same one? -

Image
does know how create following view controller using in pinterest app send pins or pick board function? on background view can see parent view display pins design category. seems me custom uitableviewcontroller presented childview transparent first cell , background of uitableviewcontroller , how set deep of background view? screenshot of view in smaller size , set background of uitableview ? can use special method manage deep of uiviewcontroller ? edited thanks help

arrays - how to sort milatry format date in javascript -

i want sort date in ascending order in javascript function.i having date in following format 3/4/2014 1300 im having follwing array contains date categoriesdata.push(recorddate); categoriesdata.sort(function (a, b) { var key1 = a.recorddate; var key2 = b.recorddate; if (key1 < key2) { return -1; } else if (key1 == key2) { return 0; } else { return 1; } }) categoriesdata have following record 3/4/2014 1300 2/4/2014 0000 1/31/2014 1030 now want sort these record in such way following output 1/31/2014 1030 2/4/2014 0000 3/4/2014 1300 you have split date string , parts using regex or simple split var date = "1/31/2014 1030".split(" &q

hadoop - reading a file into array list in scala spark -

i new spark , scala. i want read file array list. this how done in java. list<string> sourcerecords; sourcerecords = new arraylist<string>(); bufferedreader sw; sw = new bufferedreader(new filereader(srcpath[0].tostring())); string srcline ; while ((srcline = sw.readline()) != null) { sourcerecords.add(srcline.tostring()); } how in scala in spark it's easy. example, val rdd = sc.textfile("your_file_path") val sourcerecords = rdd.toarray however, don't need convert rdd array . can manipulate rdd array . you can find more information in https://spark.incubator.apache.org/examples.html

javascript - How to set an upper limit for waiting for a socket.on event? -

i trigger event socket.emit('release now'); which after time may or may not trigger event (depending on user input). socket.on('released', function(){ //do stuff }); but want wait maximum, say, 5 seconds. , if not, carry on //do stuff anyway (with other minor things changed). how do settimeout ?, or should using in first place? because can't think of how have them ( socket.on('... , setimeout ) communicate each other.... not sure if understand you're after ill take shot: var eventtimeout = settimeout(function{ /* timeout code here */}, 5000); socket.emit('release now'); // emit fired , timer set socket.on('released', function() { cleartimeout(eventtimeout); // cancel our timeout since got released on time // stuff }); so /* timeout code here */ will fire if released event not happen within 5 seconds.

Date-Picker in xpages mobile app returns null -

i try use input type="date" in xpages mobile html5 web-app. field bound bean. bean gets null back. if omit type, got correct java.util.date back. i suspect bean expecting string , internal conversion date. have @ setter field , see whether accepts date parameter. edit: wrong. value of field still text in following format. http://www.w3.org/tr/html-markup/datatypes.html#form.data.date

.net - Moving cursor position? -

with below code, want shift cursor on screen point (200,200) works fine, when move mouse (with hand) cursor returns original location. doing wrong? i running xp on kvm virtual machine running on linux host - not should effect how program runs. i have tried other methods suggested various bulletin boards same effect. public class form1 private sub form1_load(byval sender object, byval e system.eventargs) handles me.load system.windows.forms.cursor.position = new point(200, 200) end sub end class thank-you comments. <global.microsoft.visualbasic.compilerservices.designergenerated()> _ partial class form1 inherits windows.forms.form ' inherits system.windows.forms.form 'form overrides dispose clean component list. <system.diagnostics.debuggernonusercode()> _ protected overrides sub dispose(byval disposing boolean) if disposing andalso components isnot nothing components.dispose() end if

regex - Multiline grep to find variable (constructor) definitions recursively -

how can create multiline grep across files inside directory prints out string in between both patterns including patterns themselves? i tried use several variants, i'm kind of stuck regexp matching multiple lines. grep -rpzo "var class = (.*) \};" ./ grep -rpzo "var class = function\(\{(.*)\};" ./ the grep command should files recursively , print out contents in between (and including) "var class = " , first "};" occurs after it, might after several line breaks. possible using grep (and not pcregrep)? the first pattern definition of javascript function works fine, that's i'm stuck: grep -rpzo "var class = function\((.*)\)\s\{" ./ an example definition of content should matched (to try out things more easily): var class = function(data, game) { var settings = lychee.extend({}, data); this.foo = { x: 0, y: 0, z: 0 }; this.setfoo(settings.foo); lychee.game.bar.call(this, settings); se

android - How to call function without using onClick -

i beginner of learning android. here want call endfun(view v) method oncreate(bundle savedinstancestate) method out using onclick .any 1 here suggest me. package com.example.loginandroid; import java.sql.connection; import java.sql.drivermanager; import java.sql.resultset; import java.sql.sqlexception; import java.sql.statement; import android.os.bundle; import android.app.activity; import android.app.alertdialog; import android.util.log; import android.view.view; import android.widget.edittext; import android.widget.toast; import android.os.looper; public class mainactivity extends activity{ string username,password; resultset rs =null; boolean temcfag=false,temqfag=true; public static string tag="lifecycle activity"; edittext user,pass; alertdialog.builder dialog; @override protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.activity_main); dial

django - CSRF Token in Phonegap using AJAX -

i'm developing app phonegap uses django back-end. back-end uses csrf , need phonegap app use csrf can work django . i've read can use csrf via ajax, haven't been able make work. could please tell me example how can this? just catch csrf_token in html page in script tag @ time of document ready var csrf = {{ csrf_token }} and via ajax pass parameter in js file $.ajax({ csrfmiddlewaretoken: csrf; ..// });

how to add a parameter in listbox request ms-access -

i have request a prameter select * mytable id = myparam i'd tout use request fill m'y listbox dont know how tout add m'y request parameter. param field of form m'y listbox is. you can refer form in query string: select * mytable id = forms!theformnamehere!thefieldorcontrolnamehere it best refer control name rather field name.

how to find the location within image using latitude and longitude of the location that store in spatial image? -

take location user enter @ time of registration , provide image of location crop image. example, there satellite images of 'gujarat' (tiff image-spatial image) store in spatial database. user want access ahmedabad, he/she enter ahmedabad access ahmedabad portion whole gujarat image instead of whole image display.

iis - How to run .asp code on Windows7, 64 bit? Since the ASP folder in Windows Feature is already checked, still giving an error, "HTTP 404 Not Found"? -

iis started still asp page not being displayed. can tell me how run classic asp programs on windows7 64 bit, new asp. issue solved changed setting in iis manager set enable parent paths true , send errors browser true , happened. localhost home page of iis displayed , asp scripts running.

tfs - Code review Check-in policy for Visual Studio Online -

is there oob code review policy on check in tfs online i took @ http://visualstudiogallery.msdn.microsoft.com/3bd2115e-9009-414b-bb5b-a0a64e4dad9e/view/discussions seems tfs 2013 on prem. if not, ca point me towards implementing custom check in policy as pointed, tool works tfs online, has installed on every box, connecting tfs online why think tfs on prem? did try out? seems can configure tfs online.

objective c - Combining-OpenGL-ES-Cocos2d functionality -and-OpenGL-ES-(Unity 3d) navigation--within-iOS-app -

i developing app able run unity 3d navigation within using unityappcontroller , pause when not using navigation. main app have engine i.e cocos2d have other functionality. now issue 3d navigation working if cocos2d(uses opengl-es) functionality not used, once used cocos2d functionality & again came 3d navigaton appears frozen. here app delegate(inherits unity appcontroller class) handling unity pause & play - (bool)application:(uiapplication *)application didfinishlaunchingwithoptions:(nsdictionary *)launchoptions{ [super application:application didfinishlaunchingwithoptions:launchoptions]; self.unityvc = [self getrootcontroller]; uibutton *button =[uibutton buttonwithtype:uibuttontypecustom]; [button setbackgroundcolor:[uicolor colorwithred:108.0/255 green:106.0/255 blue:55.0/255 alpha:1]]; [button settitle:@"done" forstate:uicontrolstatenormal]; // [button settitlecolor:[uicolor blackcolor] forstate:uicontrolstatenormal]; [button setframe:frame]; [b

java - Install JSR-82 on eclipse -

i'm using eclipse ide java developers , want run piece of program can't :/ import javax.bluetooth.*; import javax.microedition.io.*; import com.atinav.bcc; public class wirelessdevice implements discoverylistener { localdevice localdevice = null; public wirelessdevice (){ //setting port number using atinav's bcc bcc.setportname("com1"); //setting baud rate using atinav's bcc bcc.setbaudrate(57600); //connectable mode using atinav's bcc bcc.setconnectable(true); //set discoverable mode using atinav's bcc bcc.setdiscoverable(discoveryagent.giac); try{ localdevice = localdevice.getloacldevice(); } catch (bluetoothstateexception exp) { } // implementation of methods in discoverylistener class // of javax.bluetooth goes here // work } } i installed jme wireless toolkit 2.2 not i'm looking for. i want program in java connection bluetooth device. so can explai

c# - pre and post actions to an existing class method -

i’m novice in c# , need help. need implement series of wrappers functions perform pre , post action besides original method. this way (one function example): class { public streamwriter writer; public bool writeln(string texttowrite)//wrapper writer.write(string) { preaction(); this.writer.write(texttowrite); postaction(); } } related scenarios - tracing each function entry (so signature of post , pre void post() , iterating method parameters through reflection). i need done on numerous classes , functions- wrapping each 1 tedious, if change need reopen code many times. solution can think of (instead of composition-see attached code above) inheriting streamwriter , overriding base method, again multiple classes , functions isn’t pretty, can think or know of different way doing that? br, mosh. you write wrapper class , either pass constructor of class want wrap methods of, or have class cre

r - Why heatmap.2 add unwanted replicate columns? -

Image
given data, (complete 1 can found here: http://pastebin.com/raw.php?i=6ntcnlj7 ): probes gene.symbol immgen foo_yj_06.ip foo_mi_06.ip foo_nl_06.id foo_yj_06.id foo_mi_06.id bar_nn_06.ip bar_pr_06.ip bar_yj_06.ip bar_mi_06.ip bar_nl_06.id bar_yj_06.id bar_mi_06.id bar_nn_24.ip bar_pr_24.ip bar_yj_24.ip bar_mi_24.ip bar_nn_06.ip bar_nn_24.ip bar_pr_06.ip bar_pr_24.ip bar_yj_06.ip bar_yj_24.ip bar_mi_06.ip bar_mi_24.ip bar_nl_06.id bar_yj_06.id bar_mi_06.id txt_nl_06.id txt_yj_06.ip txt_mi_06.ip txt_yj_06.id txt_mi_06.id xxx_yj_06.ip xxx_mi_06.ip xxx_nl_06.id xxx_yj_06.id xxx_mi_06.id kth_nl_06.id kth_yj_06.ip kth_mi_06.ip k3_yj_06.id k3_mi_06.id uuu_yj_06.in uuu_mi_06.in dar_nl_06.id dar_yj_06.id dar_mi_06.id 1425352_at rcor3 stromalcells(12.99),dendriticcells(12.18),stemcells(11.43),nkcells(10.50),macrophages(10.11),abtcells(9.11),neutrophils(8.7

javascript - Pop Up form before Executing PHP Function -

what want achieve : a user enters page called (certificate search) html form asking fname, lastname , , serial number. when user clicks 'submit' , form method 'get' send data php query database display data based on details in form. i want each time user click 'submit' there pop form . (preferably input fields name , company name , email address , on, , form send data , data html form before e-mail address . user has complete form before proceeding view results. ) any please? or willing point me right direction? my html page @ moment : <? php code receive fname,lname , serial html form ?> <h2>search certificate holder details through our databases below :</h2> &nbsp; please enter exact : <form action="" method="get"> <input type="text" name="fname" placeholder="first name" /> <input type="text" name="lname" placeholder="last name&quo

visual sourcesafe - How to write to file in VSS from c# code? -

i have project visual source safe (vss) , need append lines ".sql" file. trying use obvious code: using (streamwriter sw = file.appendtext(lblsourcefile.text)) { sw.writeline("text here"); } but getting "file access" error because file not checked out in vss. there way programmaticlly check-out file edit , check in when finish ? links found using vssdatabaseclass, , don't how add reference sourcesafetypelib dll , use vssdatabaseclass... you can add ssapi.dll, can found in installation folder of vss, reference , can use sourcesafetypelib. here can see sample.

sql server 2008 - SQL Replication Publisher thinks Subscriber is wrong version -

i have 2 sql server 2008 instances, 1 running workgroup edition (publisher) , other standard (subscriber) i trying replicate database getting errors when tries create database @ subscriber because thinks running sql server 2005 reason. has had issue before? i getting error column location in object members contains type geography, not supported in target server version, sql server 2005. have checked compatibility mode databases? for example: select compatibility_level sys.databases name = 'yourdbname';

javascript - empty input value after ajax call -

i have ajax call make after button click in html code: html: <div id="singlemethod"> <input type="hidden" id="teachersol" value=""> [...] <button type="button" id="run" onclick="javascript:play(1, 105, 2)"> <img src="./images/green_play.png" width="40px" height="40px"> </button> </div> javascript/ajax: function play(mn, id, nofm) { (i=1; i<=nofm; i++) getsolution (i, id, mn); executemethod (mn, id); } function getsolution (mn, id, actmn) { $.ajax({ type: "get", url: "ajax/getteachsol.php", data: "id="+id+"&number="+mn, success: function(data){ $('#teachersol').val(data); } }); return false; } function executemethod (mn, id) { var teach= documen

Check start end end points are same in Google Map -

is there way check whether start , end positions same locations using google maps api v3. here latitude , longitude , start point : 41.30395, -72.92671 end point : 41.3039500,-72.9267090 using latlng class's equals function: https://developers.google.com/maps/documentation/javascript/reference#latlng var start = new google.maps.latlng(41.30395, -72.92671); var end = new google.maps.latlng(41.3039500,-72.9267090); alert(start.equals(end)); alternatively if want check 2 locations 'approximately' equal, define how many decimal places want round coordinates to. round coordinates compare them. var startlat = start.lat(); var endlat = end.lat(); var startlng = start.lng(); var endlng = end.lng(); // round 3dp: startlat = startlat.tofixed(3); endlat = endlat.tofixed(3); startlng = startlng.tofixed(3); endlng = endlng.tofixed(3); console.log(startlat === endlat && startlng === endlng); console.log(st

regex - alphanumeric regular expression in R -

i trying use [:alnum:] explained on ?regex anyone knows why grepl("^([a-za-z0-9])+([;])", x="dj5sads;adsa") returns true, grepl("^([:alnum:])+([;])", x="dj5sads;adsa") returns false? [:alnum:] name of class. want put named class character class, have enclose pair of [] : [[:alnum:]] in example it'd be grepl("^([[:alnum:]])+([;])", x="dj5sads;adsa") //output: true demo @ ideone

vba - IAccessible type not defined visual basic -

i have old project in vb6 i want use msaa accessebility , error on line: private declare function accessiblechildren lib "oleacc" (byval pacccontainer iaccessible, byval ichildstart long, byval cchildren long, rgvarchildren variant, pcobtained long) long error: type not defined i think iaccessible type not defined , how correctly define , use in vb6? according this article on brainbell.com , must add reference oleacc.dll in order able use iaccessible type: before start building project of course need load microsoft active accessibility sdk (msaasdk). after you've loaded sdk, must create reference in project accessibility dll, oleacc.dll. select references project menu, click browse button find oleacc.dll file. default file located in \windows\system folder. once you've created reference, can view accessibility library through object browser in visual basic. when select accessibility project/library drop-down

ios - Starting up in a different view controller depending on whether the iPad is in accessibility mode -

first of possible start app in different view controller. thinking if there way app detect whether in kind of accessibility mode before starting app. possible , how go doing it? or have kind of workaround? while drawing attention david's question (do think needed?), there ways determine whether voiceover running , when changes. uiaccessibilityisvoiceoverrunning() : determine if voiceover running. uiaccessibilityvoiceoverstatuschanged : posted uikit when voiceover starts or stops. the initial detection of voiceover performed in application delegate's didfinishlaunchingwithoptions: method, can display corresponding viewcontroller. however, david points out, in case of voiceover toggle, you'll need pick right action. might not want, since can lead complex situations. this article , same david, provides great insight in uiaccessibility framework. update instead of having different viewcontrollers accessibility enabled , disabled, respectively, let e

Understanding em Units in CSS and what is abbreviation of em? -

having worked in web design , development field , it’s taken me while break free fixed-width, pixel-based designs. although i’ve started doing responsive layouts, i’m still hooked on pixel units. while might fine layout elements, think typography, em unit should go-to unit. what abbreviation of em ? an em unit of measurement in field of typography, equal specified point size. name of em related m. unit derived width of capital “m” in given typeface.

CSS color child on Hover -

i got this: <div id="father"> <span class="child1"><span> <div class="child2"><div> </div> i need change text color of child2 on father:hover, , able that, when hover on child1, child2 loose color , displayed normally, how can set hover on child1 not loose hover effect ? i've tried , doesn't work .child1:hover .child2{ color: #eed847; } thanks .child1 not parent of .child2 in example, expected use of space in selector. the following selector should work, when of .child1 or .child2 hovered. #father:hover .child2 { ... } demo

asp.net - Activation error occurred while trying to get instance of type AccountController, key \"\"" -

that's accountcontroller : [authorize] public class accountcontroller : controller { private usermanager<user> _usermanager { get; set; } public accountcontroller() : this(new usermanager<user>(new userstore())) {} public accountcontroller(usermanager<user> usermanager) { _usermanager = usermanager; } } and stack trace: microsoft.practices.servicelocation.activationexception unhandled user code hresult=-2146233088 message=activation error occurred while trying instance of type accountcontroller, key "" source=microsoft.practices.servicelocation stacktrace: @ microsoft.practices.servicelocation.servicelocatorimplbase.getinstance(type servicetype, string key) in c:\projects\commonservicelocator\main\microsoft.practices.servicelocation\servicelocatorimplbase.cs:line 53 @ microsoft.practices.servicelocation.servicelocatorimplbase.getinstance(type servicetype) in c:\projects\commonservicelocator\main\m

php - multilanguage database driven website with laravel4 -

im messing around laravel multilanguage website. i trying implement this: $languages = array('en','fr'); $locale = request::segment(1); if(in_array($locale, $languages)){ \app::setlocale($locale); }else{ $locale = null; } route::group(array('prefix' => $locale), function() { route::get('/', 'homecontroller@index'); route::get('contact', 'homecontroller@contact'); }); for can see, everythings works fine, understand, laravel take locale url segment, check if it's in languages, if not null change routing adding prefix. have 2 question: 1) why images not showed anymore, when go en/contact, while when go en/ can see them. 2) use database pick languages, don't necessarly have change app:setlocale, need model extract language database , put in right place? 3) how pass variable languages blade, can change description of product?? (i used ?lang=en , take $_get sorry know maybe basic question,

c# - How to check where in your text file you found a string -

edit: fixed :) thanks! i'm trying make login code , i'm having bit of trouble @ login function. need check line username located in, within text file. possible? if not there way around this? edit: added code using system; using system.collections.generic; using system.linq; using system.text; namespace consoleapplication1 { class program { static void main(string[] args) { int loginattempt = 0; using (system.io.streamwriter file = new system.io.streamwriter("c:\\users\\public\\usernames.txt", true)) { file.writeline(); } int usertype = 0; string retrievedusername = string.empty; using (system.io.streamreader fileusername = new system.io.streamreader("c:\\users\\public\\usernames.txt")) { retrievedusername = fileusername.readtoend(); } console.foregroundcolor = consolecolor.magenta; console.writeline("please note p

javascript - Datatables 1.10 - Swap table -

in application have table can have multiple columns, based on date range selected. need able display table containing 20 columns or 50 columns (number of columns based on data range parameters). did that, refreshing page when parameters changed. i'm trying better. i've created sample shows approach: http://live.datatables.net/fojusec/3 basically i'm swapping "table" new content comes ajax request , i'm calling "datatable" on new table. example works fine, wondering if maybe there better way it, maybe reconfiguring table? is safe did it? i'm worried leaks. edit: i'm not sure if datatable object attached table. if i'm removing table dom should removing datatable object also. avoid conflicts. clicked on example time , didn't got errors. question: best way swap or reconfigure table using datatables 1.10

android - How my customer can get paid for a mobile app I develop? -

i developing game unity customer. want him receive payment paid version, how do that? understand need create google , apple developer account, info there mine. so, how can setup specific app publish customer receive payment? publish account create customer, , not yours !

c# - Enable Cache Globally from Global.asax -

i trying enable server-side cache (output caching) globally global.asax in mvc3 project. i tried this: protected void application_beginrequest(object sender, eventargs e) { if (httpcontext.current.request.path.contains("private")) { return; } response.cache.setexpires(datetime.now.addseconds(300)); response.cache.setcacheability(httpcacheability.server); response.cache.varybyheaders["host"] = true; response.cache.varybyparams["myparam"] = true; } but if put datetime.now in 1 of pages changes on every request. doesn't seems work. i have tried put on application_prerequesthandlerexecute event in this answer no luck. is there way achieve behavior global.asax? note: want filter url's being cached. edit: started bounty steven v's answer put me on right track, after hours of developing "my own cache system" extending actionfilterattribute , ha

Error binding reference to array passed to function (c++) -

i'm using mingw64 eclipse , language c++ stated above. i have following code: double * my_function (my_class i1, my_class i2, double return_vector[3]) { double test[3]; double (&rtest)[3]=test; double (&description_vector)[3] = return_vector; // more code return (description_vector); } binding rtest test works fine, here compiler tells me warning: unused variable , expected, it's not used anywhere in code wanted find out if works in principle. however binding description_vector return_vector results in following error: error: invalid initialization of reference of type 'double (&)[3]' expression of type 'double*' why? why binding rtest test legal not binding of description_vector return_vector ? so may ask "but why binding reference description_vector return_vector ? use return_vector in return statement - it's same after all." i want confer information reader of code (basically me when i&

java - Appropriate listener for Swing JTree -

i have jtree , , based on selection want button enabled, have used treeselectionlistener : tree.addteeselectionlistener(new treeselectionlistener() { @override public void valuechanged(treeselectionevent event) { okbutton.setenabled(true); } }); the button getting enabled bit late second or two. problem here? am using correct listener?