Posts

Showing posts from April, 2011

Java named entity recognition library for Persons Name "Parts" -

my current project needs improve data quality of our customers details. one issue have customers names have seperate data capture input fields first, middle names , surnames, in many cases each part of name entered incorrectly. we need clean data hold. this data quality issue impacts when contact our customers in correspondance, because not know first name, middle names , surnames offend customers using inappropriate salutation we need named entity recognition library can not detect persons names, detct first, middle , surnames. what makes data quality task harder have 100 million customers, our customer base world wide need able identify first , middle , surnames, e.g. given name, patronymic, , different ordr of parts. know customers nationallity. does named entity recognition exist specific person name parts? i realise "perfect" solution impossible, sure can improve data quality have. i mentioned first, middle , surnames thats name structure familiar wit

c++ - How to take input in integers and print message (numeric keypad) -

i have searched on internet specific method there not looking for. wrote program takes input in integers , prints message( in numeric keypad of cellphones). want program take input in 1 line enter code crack : 454545479833165445 and corresponding message gets printed. rather than enter code crack :55 enter code crack : 666 and prints message when press specific key -1 in case. #include <iostream> using namespace std; int main() { int a; string n; do{ cout << "enter code crack"; cin >>a; switch (a){ case 0: { n=n+" ";} break; case 1: { n=n+".";} break; case 11: { n=n+",";} break; case 2:{ n=n+"a";} break; case 22: n=n+"b"; break; case 222: n=n+"c"; break; case 3: n=n+"d"; break; case 33: n=n+"e"; break; case 333:

c++ - Creating temporary table while still accessing other tables -

i've got 2 or more databases attached 1 sqlite database connection. each database consists of 3 tables. have better access searching/filtering, create huge temporary table on tables , databases this: "create temporary table temp_table " "select * pb.name_table " "left join pb.phone_table on (pb.name_table.id=pb.phone_table.id) " \ "left join pb.email_table on (pb.name_table.id=pb.email_table.id) " \ "union select * name_table " \<br> "left join phone_table on (name_table.id=phone_table.id) " \ "left join email_table on (name_table.id=email_table.id);"; if changes in table, have recreate temporary table. increasing amount of data, creating temporary table takes time, since i'm having continuous read access table, idea follows: create thread, creates second temp table in background block access reading clients drop first temp table rename second temp table

Houghpeaks function in Hough transform ( matlab code ) -

look @ houghpeaks function hough transform in matlab toolbox: peaks = houghpeaks(h, numpeaks) peaks = houghpeaks(..., param1, val1,param2, val2) paramter: 'nhoodsize' : two-element vector of positive odd integers: [m n]. question: nhoodsize must odd ? why? wouldn't because otherwise you're not landing on cell boundary? 1 2 3 4 5 6 7 8 9 vs. 1 2 3 4 in nhood calculations element in middle being evaluated , somehow being influenced surrounding values.

How to include a server in an android studio project? -

how 1 incorporate server android studio project? saw video on youtube programmer incorporated tomcat server eclipse project. if can in eclipse why not in studio? suggestions. also, possible communicate via wifip2p while streaming live video 1 cellphone one? thereby, bypassing sip stack implementation. thank you can use github , android studio can sync projects

c - Incorrect output from while loop -

this function asks integer between lolimit , hilimit , allows user safely enter it. keeps asking until user enters number in legal range. returns legal number. the correct output should be: please enter integer between 32 , 127: 19 please enter integer between 32 , 127: 128 please enter integer between 32 , 127: 48 please enter integer between 48 , 127: 47 please enter integer between 48 , 127: 65 however, output behaves strangely, seems if lolimit value changes , forth. also, numbers recorded after entered twice. please enter integer between 32 , 127: 2 please enter integer between 32 , 127: 150 please enter integer between 32 , 127: 56 please enter integer between 32 , 127: 56 please enter integer between 56 , 127: 66 please enter integer between 32 , 127: 66 please enter integer between 66 , 127: 77 here's code: int enternumber (int lolimit, int hilimit){ int min; int max; { printf("please enter integer between %d , %d:\n", lolimit, hilim

php - How can I remove unit tag from URL in contact form 7 plugin -

i had added contact form 7 in project facing problem, problem #wpcf7-f182-o1 coming url when click on contact form 7 send button...what , how can remove problem ? please help...thanks in advance. add below code functions.php , remove it. add_filter('wpcf7_form_action_url', 'remove_unit_tag'); function remove_unit_tag($url){ $remove_unit_tag = explode('#',$url); $new_url = $remove_unit_tag[0]; return $new_url; }

python - Numpy reshape array of arrays to 1D -

how x become 1d array? found convenient create x this, x=np.array([[0,-1,0]*12,[-1,0,0]*4]) print x print len(x) returns array([ [0, -1, 0, 0, -1, 0, 0, -1, 0, 0, -1, 0, 0, -1, 0, 0, -1, 0, 0, -1, 0, 0, -1, 0, 0, -1, 0, 0, -1, 0, 0, -1, 0, 0, -1, 0], [-1, 0, 0, -1, 0, 0, -1, 0, 0, -1, 0, 0]], dtype=object) 2 i tried making this, length still 2 y=((0,1,0)*12,(-1,0,0)*4) print y returns ((0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0), (-1, 0, 0, -1, 0, 0, -1, 0, 0, -1, 0, 0)) i have tried using numpy.reshape (on both x , y): np.reshape(x,48) but error: valueerror: total size of new array must unchanged is possible reshape x or y when have declared them did? when create array, concatenate lists + instead of packing them in list: x = np.array([0,-1,0]*12 + [-1,0,0]*4)

How do I add a button to an Android Frame Layout, in the same position as my picture (centered in the bottom 4th of the screen)? -

Image
this android question. how add button frame layout, in same location picture? i trying add button on top of frame layout (which has background image , no title bar) so: this entire code of layout far. code add put button in picture? activity_home_page.xml: <framelayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:gravity="center" tools:context=".homepage"> <imageview android:layout_width="match_parent" android:layout_height="match_parent" android:src="@drawable/my_background_image" android:scaletype="fitxy"> </imageview> </framelayout> how add button frame layout, in same location picture? i have tried & come solution. <framel

multithreading - Simple Traffic Light Simulation with Java Threads -

as questions states, trying make very, simple traffic light simulation of 4 way intersection. problem is, using 2 different threads , trying bounce , forth between 2 using wait , notify while inside loop. have psuedo code below. public class processor { public static int carcounter = 1; public void lightoneandtwo() throws interruptedexception { synchronized(this) { for(int carsone = 0; carsone < 50; carsone++) { //light one----------------------------> //light two----------------------------> wait(); } } } public void lightthreeandfour() throws interruptedexception { thread.sleep(1000); synchronized(this) { for(int carstwo = 0; carstwo < 50; carstwo++ ) { //light three----------------------------> notify(); } } } } but whe

php array conversion from two to one dimension -

this question has answer here: how convert 2 dimensional array 1 dimensional array in php5 [duplicate] 5 answers i have array following. array(1) { ["foo"]=> array(2) { [1]=> string(5) "abcde" [2]=> string(4) "pqrs" } } now want convert following array(2) { [1]=> string(5) "abcde" [2]=> string(4) "pqrs" } how can achieve that? i hope job: $onedimensionalarray = call_user_func_array('array_merge', $twodimensionalarray); please have @ array_merge .

jquery - on every button click show same panel with usercontrol on it, again down of it -

on every button click show same panel user-control on has display, again down of <%@ control language="c#" autoeventwireup="true" codebehind="webusercontrol1.ascx.cs" inherits="nbid2.webusercontrol1" %> <table> <tr> <td> <asp:label id="label1" runat="server" text="label"></asp:label> </td> <td> <asp:textbox id="textbox1" runat="server"></asp:textbox> </td> </tr> <tr> <td> <asp:button id="button1" runat="server" text="button" /> </td> </tr> </table> > my asp x page on every link-button click same panel has display again again <body> <form id="form1" runat="server"> <div> <table> <tr> <td> <asp:panel id="panel1" runat="server&qu

r - dplyr sample_n where n is the value of a grouped variable -

i have following grouped data frame, , use function dplyr::sample_n extract rows data frame each group. want use value of grouped variable ndg in each group number of rows extract each group. > dg.tmp <- structure(list(gene = c("camk1", "ghrl", "timp4", "camk1", "ghrl", "timp4", "arl8b", "arpc4", "sec13", "arl8b", "arpc4", "sec13" ), glb = c(3, 3, 3, 3, 3, 3, 10, 10, 10, 10, 10, 10), ndg = c(1, 1, 1, 2, 2, 2, 1, 1, 1, 2, 2, 2)), class = c("tbl_df", "tbl", "data.frame"), row.names = c(na, -12l), .names = c("gene", "glb", "ndg")) > dg <- dg.tmp %>% dplyr::group_by(glb,ndg) > dg source: local data frame [12 x 3] groups: glb, ndg gene glb ndg 1 a4gnt 3 1 2 abtb1 3 1 3 ahsg 3 1 4 a4gnt 3 2 5 abtb1 3 2 6 ahsg 3 2 7 aadac 10

java - Why isn't this program repainting a certain part of an applet even when repaint() is called -

this simple rock, paper, scissors appelet. there 3 variables keeping track of wins, losses, , ties. there label meant display them. when used debugger repaint method being called don't understand why portion of applet isn't updating. import java.awt.font; import java.awt.graphics; import javax.swing.japplet; import javax.swing.jlabel; import javax.swing.jbutton; import java.awt.event.actionlistener; import java.awt.event.actionevent; import java.util.random; public class jrockpaperscissors extends japplet { jlabel lbldescision = new jlabel("descision"); jlabel lblwinner = new jlabel("winner"); jlabel lbltally = new jlabel("tally"); int tally_user = 0; int tally_comp = 0; int tally_ties = 0; /** * create applet. */ public jrockpaperscissors() { setsize(500,500); getcontentpane().setlayout(null); jlabel lblrockpaperscissors = new jlabel("rock, paper, scissors"); lblrockpapersc

io - Python: Trying to speed up a program that is running very slow -

so, program parses e-mail address , plain-text password text file. then, runs them through few encryption routines , appends encrypted text onto end of e-amil address:password entry in new file. import io crypto.cipher import aes import base64 import struct def str_to_a32(b): if len(b) % 4: b += '\0' * (4 - len(b) % 4) return struct.unpack('>%di' % (len(b) / 4), b) def a32_to_str(a): return struct.pack('>%di' % len(a), *a) def aes_cbc_encrypt(data, key): encryptor = aes.new(key, aes.mode_cbc, '\0' * 16) return encryptor.encrypt(data) def aes_cbc_encrypt_a32(data, key): return str_to_a32(aes_cbc_encrypt(a32_to_str(data), a32_to_str(key))) def base64urlencode(data): data = base64.b64encode(data) search, replace in (('+', '-'), ('/', '_'), ('=', '')): data = data.replace(search, replace) return data def a32_to_base64(a): return base64urlencode(a32_to_str(a))

Android AlarmManager lifecycle not working -

i'm trying make app fires user set timed notification, once pressed send user requested website. thing is, since these notifications can fire after hours, android restarts application, erasing alarms , notifications. i've tried putting persistent attribute in manifest extend life still erases everything. tried finding way save timers in bundle not find way make fire notification on time. note: happens when app set in background long. this mainactivity protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.activity_main); // makes app continues last session if created if(!istaskroot()) { finish(); } } protected void onactivityresult(int requestcode, int resultcode, intent data) { if (requestcode == 15){ name = data.getstringextra("name"); string x = data.getstringextra("url"); hours = data.getintextra("hour", 0); min

java ee - IllegalAccessError: tried to access method org.netbeans.modules.glassfish.eecommon.api.config.GlassfishConfiguration.<init> -

i'm doing jsf project in netbeans 8.02 using glassfish v2. somehow, when right click on project , click on properties, gives no response message: netbeans: unexpected exception. > illegalaccesserror: tried access method > org.netbeans.modules.glassfish.eecommon.api.config.glassfishconfiguration.<init>(lorg/netbeans/modules/j2ee/deployment/devmodules/api/j2eemodule;)v > class > org.netbeans.modules.j2ee.sun.ide.j2ee.moduleconfigurationimpl

ruby - Rails Model method check if field nil, if so return empty string -

in model class have method: def full_address address_lines = [self.address1,self.address2,self.address3].reject!(&:empty?).join(',') fulladdress = address_lines + ", " + self.city + ', ' + self.state + ', ' + self.zipcode return fulladdress end this easy way return address fields view them quickly. this returns undefined method 'empty?' nil:nilclass when empty. how can change method work if address1, address2, address3 empty? i guess i'm looking function like: returnblankifnilelsevalue(self.address1) anything exist? def full_address address_lines = [self.address1.to_s,self.address2.to_s,self.address3.to_s].reject!(&:empty?).join(',') fulladdress = address_lines + ", " + self.city + ', ' + self.state + ', ' + self.zipcode return fulladdress end this variation returns no implicit conversion of nil string odd because in rails console can type nil.to_s

ruby - How to make an authenticated call to the youtube API without oauth? -

i'm writing job consume youtube stats , dump them in our database. while bit of pain oauth set up, have making authenticated calls. however, want in background without browser window opening / requiring access. when i've tried initialize google api client api key fails saying "argumenterror: missing access token."

How can I get multiple Jenkins jobs with lib dependency work ( SVN repo) -

i have svn repo includes many code dependencies between different projects . each project set jenkins job . for example, compile project need project lib , bunch of other shared libs ( hundreds of mbs) . one of architectures setting jenkins job set multiple "repository url" -per each lib trunk , when of triggered, jenkins (the plugin ) checkout needed code job. end having pull gigabytes of data multiple times since each job pull shared libs it's own... since it's "pull " model , there many url's , many jobs i'm afraid won't work in long run. another thought clone trunk , parse changes , way trigger relevant job . not kiss solution , it's not solid 1 . are there better suited solutions such problem? trigger script using jenkins . pst-commit hook should bear logic. also check if can use this parameterized trigger plugin.

jquery - Using a function in replaced dom content -

okay heres problem. i'm replacing html content jquery function replace.with. parts of html contains imageslider library http://responsiveslides.com/ except jquery makes slide functional doesnt fire after content replaced. on initial page works fine after replace content stops working. did working adding click event on page replaced content. $(document.on('click', '.title', function(){ $("#slider3").responsiveslides({ auto: true, speed: 500, }); }); so above code works fine, how ever want fire when content replaced. not when user clicks on button on new page. tried this: $(document).on('click','#title1', function(){ gotofusion(); $("#slider3").responsiveslides({ auto: true, speed: 500, }); }); and tried putting folowing code in html replacing old html hoping fire after page loaded... <script> $(function () { $("#slider3").responsiveslides({ auto: true, pager: false, nav: tr

ios - NSPredicate with OR returning error -

i have problem following predicate: nspredicate *predicate = [nspredicate predicatewithformat:@"(creatoruserrecordid == %@) or (touser == %@)", userid, userid]; when use in query ckquery *query = [[ckquery alloc] initwithrecordtype:@"message" predicate:predicate]; have error says: 'ckexception', reason: 'unexpected expression'. when use these 2 seperately this: nspredicate *predicate1 = [nspredicate predicatewithformat:@"(creatoruserrecordid == %@)", userid]; nspredicate *predicate2 = [nspredicate predicatewithformat:@"(touser == %@)", userid]; and performing query 1 of these predicates works fine. tried using nscompoundpredicate result same... ideas? the documentation ckquery lists of valid predicate syntax. oddly, under "basic compound predicates" lists not , and , , && . or , || not listed , apparently not supported cloudkit query predicates.

php - Regular Expression - Negation String + OR -

i need match string not 11111 or 22222 (exact) <?php $string = 'string' $pattern = '#patter#' // have find echo preg_match($pattern, $string) ? 'match' : 'no match'; cases: $string = '33333';// match $string = '222222';// match $string = '11111';// no match $string = '22222';// no match i tried many patters google , none of them work. note : has pure regex , not negating function preg_match how about: ^(?!11111$|22222$).* test: https://regex101.com/r/wu7yo0/1

tk - How to get selective data from a file in TCL? -

i trying parse selective data file based on key words using tcl,for example have file ... ... .. ... data_start 30 abc1 xyz 90 abc2 xyz 214 abc3 xyz data_end ... ... ... how catch 30, 90 , 214 between "data_start" , "data_end"? have far(tcl newbie), proc get_data_value{ data_file } { set lindex 0 set fp [open $data_file r] set filecontent [read $fp] while {[gets $filecontent line] >= 0} { if { [string match "data_start" ]} { #capture first number? #use regex? or else? if { [string match "data_end" ] } { break } else { ##do nothing? } } } close $fp } if file smaller in size, can use read command slurp whole data variable , apply regexp extract required information. input.txt data_start 30 abc1 xyz 90 abc2 xyz 214 abc3 xyz data_end data_start 130 abc1 xyz 190 abc2 xyz 1214 abc3 xyz data_end extractnumbers.tcl set fp [open input.txt r] set

emr - MRJob - Limit Number of Task Attemps -

in myjob, how limit number of task attempts (if task fails)? i have long running tasks (have increased timeout, accordingly), want job end after 2 failed attempts @ same task, rather 4-5. i couldn't find in docs: http://mrjob.readthedocs.org/en/latest//en/latest/guides/configs-reference.html for map jobs, can set mapreduce.map.maxattempts in hadoop 2. reduce jobs, set mapreduce.reduce.maxattempts ( source ). equivalents in hadoop 1 are: mapred.map.max.attempts , mapred.reduce.max.attempts . if using conf file in mrjob, can set as: runners: emr: jobconf: mapreduce.map.maxattempts: 2

How does one install MarkLogic 8 on Ubuntu 14.04? -

what steps install marklogic 8 on ubuntu 14.04? according alex bleasdale/david ennis, download centos version; then: ubuntu , other debian based distributions use deb packages , centos or redhat use rpm packages. convert rpm deb in reliable way, 1 can use 'alien' command. install , use alien follows: sudo apt-get install alien sudo alien --to-deb --verbose [your downloaded version] in order install local deb package, can use dpkg -i option. sudo dpkg -i [your downloaded version new repacked .deb] at point, marklogic should installed. can start , stop marklogic using init script, lacks option 'status': sudo /etc/init.d/marklogic start

where to change the project configuration into the updated build tool revision in android studio? -

in android studio project, have pre-installed build tools 24.3.2 , 22, sample project going run requires build tools revision 21.1.2 error:failed find build tools revision 21.1.2 i wonder not install build tools revision 21.1.2 , change project configuration fit 24.3.2 or 22. yes, can use updated build tools . , not create problem build gradle project. just modify build.gradle app module latest build tool version : android { compilesdkversion 22 buildtoolsversion "24.3.3" //most update version can see in sdk manager defaultconfig { applicationid "com.support.android.designlibdemo" minsdkversion 9 targetsdkversion 22 versioncode 1 versionname "1.0" } buildtypes { release { minifyenabled false proguardfiles getdefaultproguardfile('proguard-android.txt'), 'proguard-rules.pro' } } } note: making life easier developers feels better share version of build tool used while smooth

android - ImageView hidden behind Button out of ideas -

i have imageview moving across screen once reaches button goes behind , imageview becomes hidden. on different layouts. have tried bringing both imageview , layout front, , making button both invisible , transparent (setalpha(0)). not sure code here ask , happily post whatever needed. <relativelayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" tools:context=".mainactivity" android:id="@+id/relativelayout1"> <imageview android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/friendly1" /> <button android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_below="@id/choice1" android:layout_weight="5" andro

php - Mysqli how to fetch all data -

i have query: $q = "select sum(cena) total, month( datum ) mesec nakupi group mesec"; $po = $mysqli->query($q); $mesecna_prodaja = $po->fetch_assoc(); this query selecting monthly sales data database. if run same query in phpmyadmin correct results. sales months total sales in each month. problem is, $mesecna_prodaja after fet_assoc returning 1 result, last month ? how can fetch data, phpmyadmin ? tried fetch_all, it's not working (internal server error). i not sure how looking @ results, need iterate through associative array fetched view results. try described in php documentation . /* fetch associative array */ while ($row = $po->fetch_assoc()) { printf ("%s (%s)\n", $row["total"], $row["mesec"]); }

ios - Remove Decimal places from Currency? -

i have following example: // currencies var price: double = 3.20 println("price: \(price)") let numberformater = nsnumberformatter() numberformater.locale = locale numberformater.numberstyle = nsnumberformatterstyle.currencystyle numberformater.maximumfractiondigits = 2 i want have currency output 2 digests. in case currency digests 0 want not displayed. 3,00 should displayed as: 3 . other values should displayed 2 digests. how can that? you have set numberstyle decimalstyle able set minimumfractiondigits property depending if double or not follow: extension double { var formatted: string { let numberformater = nsnumberformatter() numberformater.locale = nslocale.currentlocale() numberformater.numberstyle = nsnumberformatterstyle.decimalstyle numberformater.maximumfractiondigits = 2 numberformater.minimumfractiondigits = self - double(int(self)) == 0 ? 0 : 2 return numberformater.stringfromnumber(sel

c - Getting a Expected identifier or '(' issue in Xcode 6.1 -

i'm quite new c. i've tried other links no dice. i'm using xcode 6.1 , following issues: parse issue: expected identifier or '(' semantic issue: unexpected type name 'map' here's code: //hashmap.h #ifndef __hashmap__hashmap__ #define __hashmap__hashmap__ void map_init(); void map_insert(uint8_t, uint8_t); uint8_t map_getval(uint8_t); #endif /* defined(__hashmap__hashmap__) */   //hashmap.c #include <stdint.h> #include "hashmap.h" #define key_not_found -1 static int = 0; typedef struct hashmap { uint8_t key; uint8_t val; } *map; void map_init() { map = (hashmap*) calloc(1, sizeof(hashmap)); //parse issue } void map_insert(uint8_t key, uint8_t val) { int size; map[i].key = key; //parse issue map[i].val = val; //parse issue i++; size = + 1; map = (hashmap*) realloc(map, size * s

c++ - OpenCV cascade classifier from Python -

i working on computer vision/machine learning problem in python , have far not needed opencv. however, need use fast cascade classifier detect objects in set of images. came across haar based classifier written in c++. testing phase can called python, cannot find way train classifier recognize other objects python (i able find this , uses c++). is training functionality of haar cascade available through c++ or can used python? if c++, pointers on need install started? thanks!

javascript - Making Nice Labels on Google Maps -

Image
is there google maps api way display exact kind of text label next marker? know how create marker , bad looking label, hoping create labels ones appear on google maps already: montes grill & pub instance, or css/html/js stuff have do? edit: following tutorial . it looks google embed api gives option when search.

epub - How to generate .mobi file for Kindle that supports Kindle Reading Speed feature -

i generating multi-chapter ebook kindle fire first generating well-formed xhtml-based epub 3.0 format file , converting .epub file .mobi w/ kindle previewer and/or kindlegen. generated .mobi file transfers kindle , looks entirely correct. problem generated file never produces "learning reading speed" status @ bottom or actual estimate of reading time. reading speed feature never seems activated .mobi file generated kindlegen. i'm aware status area cycles through various features/statuses pressing status area on reader screen , feature never activated. i have generated alternate version of .mobi file using calibre , reading speed feature enabled, format of output file heavily altered , not consistent kindlegen format. what key generating kindle .mobi file kindlegen supports reading speed feature? i discovered answer, generated .mobi file needs 2 tags manually added, 113 asin , 501 cdecontenttype = ebok, in correct primary header of .mobi file. the

php - How can I send Contact Form 7 data as search input to another website? -

i'm trying use contact form 7 plugin wordpress local hotel owned large national chain (choice hotels). choice hotels redirects bookings website want build form lives on individual website , performs search given arrive date, depart date, # of rooms, # of adults, , # of children. this "easy booker" example of functionality want (not design though, that's handled contact form 7 in theme we're using) http://www.comfortinnalbany.com/ do need use php script? can inside contact form 7 itself? you easy booker does: include parameters in url. https://www.choicehotels.com/new-york/castleton/comfort-inn-hotels/ny279?submit=reserve%20%20&checkindate=2015-01-01&checkoutdate=2015-01-05&hotel=ny279&nadult=1&nchild=0 hack form action in contact form 7 adds search vars string, then can grab , use vars in page receives form. see get variables url string

excel - Sum minimum of corresponding column values - limited to date range -

i have data set 4 columns: start date , end date , scheduled qty , , actual quantity : start date end date scheduled qty actual qty 04/13/15 04/17/15 35 19 04/20/15 04/24/15 35 42 04/27/15 05/01/15 35 41 05/04/15 05/08/15 35 41 i want find total actual, except when actual exceeds scheduled want used scheduled number. in answered question (sum minimum of corresponding column values) found array formula works total lesser values of each row qty columns (quotes used display less symbol): =sum(if(c1:c4"<"d1:d4, c1:c4, d1:d4)) this gives me total whole range, i'd limit date range such end dates within given month. i've used sumifs in other situations @ end dates , sum data falls within given month, i'm not figuring out how combine idea 1 array formula. any ideas how make happen? i'm working in excel 2013. here's extension of chancea&#

c++ - What is an undefined reference/unresolved external symbol error and how do I fix it? -

what undefined reference/unresolved external symbol errors? common causes , how fix/prevent them? feel free edit/add own. compiling c++ program takes place in several steps, specified 2.2 (credits keith thompson reference) : the precedence among syntax rules of translation specified following phases [see footnote] . physical source file characters mapped, in implementation-defined manner, basic source character set (introducing new-line characters end-of-line indicators) if necessary. [snip] each instance of backslash character (\) followed new-line character deleted, splicing physical source lines form logical source lines. [snip] the source file decomposed preprocessing tokens (2.5) , sequences of white-space characters (including comments). [snip] preprocessing directives executed, macro invocations expanded, , _pragma unary operator expressions executed. [snip] each source character set member in character literal or string literal, e

compilation - Sub line gives compile error: variable not defined -

upon trying run code error "compile error: variable not defined" , highlights sub line. here code reference. sub ri_processing() dim single dim output() single 'define dynamic array solver output process dmso data = 1 45 step 1 workbooks("calibration range 1 normalized profiles.xlsx").activate rawdata.range("c10:c649") = sheet1.columns("i").values solverok setcell:="$e$7", maxminval:=2, valueof:=0, bychange:="$b$2:$b$4", _ engine:=1, enginedesc:="grg nonlinear" solversolve workbooks("simulated fresnel function.xlsx").activate output(i, 1) = sheet1.range("b4").values next = 0 ' process nacl data = 1 102 step 1 workbooks("calibration range 1 normalized profiles.xlsx").activate rawdata.range("c10:c649") = sheet2.columns("i").values solverok setce

javascript - is there any way to draw canvas images with relative positioning -

i trying have wheel on canvas multiple equal size segments similar wheel of fortune. on circumference of wheel, i.e arc of each segment, want have image attached needs rotate wheel. i able draw multiple images, have positioned respect (0, 0) (top-left) of canvas only. there way position them relative point instead of origin? in case centre of circle (300, 300)? you can translate origin of canvas calling .translate(x, y) method of canvas drawing context; in example both x , y 300. see https://developer.mozilla.org/en-us/docs/web/api/canvas_api/tutorial/transformations more information on canvas transformations.

vb.net - Sub executed before another -

i have following sub public sub transfer() dim integer dim j integer dim k integer dim searching_date string dim name string dim presente boolean dim foto_presente boolean = 0 cdii - 1 searching_date = image_date(camera_day_images(i)) name = replace(camera_day_images(i), camera & path_in_camera & "\", "") presente = false j = 0 while (not presente , j <= pci) if (path & "\" & right_date(searching_date)) = pc_directory(j) presente = true else presente = false end if j = j + 1 end while if presente = true foto_presente = false k = 0 list_pc_day_images(path & "\" & right_date(searching_date)) while (not

c# - Update Many to Many Entity Framework. Cannot remove from many to many table -

there many many relationship between user , roles. can add role many many table, cannot remove it, not give me error don't remove roles remove. try found. here code. public user update(user entity) { using (var context = new enersysentities()) { var user = context.users.single(u => u.user_id == entity.user_id); //all roles in data base list<role> rolealreadyassigned = getbyid(entity.user_id).roles.tolist(); //roles remove list<role> rolestoremove = rolealreadyassigned.where(x => entity.roles.all(y => y.role_id != x.role_id)).tolist(); //roles add list<role> rolestoadd = entity.roles.where(x => rolealreadyassigned.all(y => y.role_id != x.role_id)).tolist(); foreach (role roletodelete in rolestoremove.tolist()) { // remove roles rolestoremove user.rol

c# - coiniumServ works on windows, fails on mono at runtime with System.Reflection.ReflectionTypeLoadException -

i've started working on coiniumserv code. code run on windows, on linux server fails. stack trace: nancy.tinyioc.tinyiocresolutionexception: unable resolve type: coiniumserv.server.web.webserver ---> nancy.tinyioc.tinyiocresolutionexception: unable resolve type: coiniumserv.server.web.nancybootstrapper ---> system.typeinitializationexception: exception thrown type initializer nancy.bootstrapper.assemblytypescanner ---> system.reflection.reflectiontypeloadexception: classes in module cannot loaded. @ (wrapper managed-to-native) system.reflection.assembly:gettypes (system.reflection.assembly,bool) @ system.reflection.assembly.getexportedtypes () [0x00000] in <filename unknown>:0 @ nancy.extensions.assemblyextensions.safegetexportedtypes (system.reflection.assembly assembly) [0x00000] in <filename unknown>:0 @ nancy.bootstr

hadoop - map/reduce functionality -

i started looking hadoop , made wordcount example work on cluster(two datanodes) after going through struggles. but have question map/reduce functionality. read during map, input files/data transformed form of data can efficiently processed during reduce step. let's have 4 input files(input1.txt, input2.txt, input3.txt, input4.txt) , want read input files , transform form of data reduce. so here question. if run application (wordcount) on cluster environment (two datanodes), these 4 input files read on each datanode or 2 input files read on each datanode? , how can check file read on datanode? or map(on each datanode) read files kind of block instead of reading individual file? see hadoop works on basis of blocks rather files. if 4 files less 128mb(or 64mb depending on block size) read 1 mapper. chunk read mapper known inputsplit. hope answers question.

forest plot three shapes in R -

Image
i using "pimp forest plot" make nice graphs. http://www.r-bloggers.com/pimping-your-forest-plot/ the tutorial explains how make nice forest plot, combing data 2 countries have @ subgroup effects. each country has own distinctive shape on graph eg sweden diamond... subgroup effects in countries easy pick out. i'm having problem when trying merge 3 dfs (for 3 countries) though. instead of retaining separate shapes each country in each subgroup (see graph when combining 2 countries), when put 3 countries shapes gender circular, shapes age square , on. instead should there circle, diamond , square represent effects of gender/age in each country. does know i'm doing wrong here? i've been retracing steps , adding 1 df @ time can @ least try see i'm doing wrong: it's not coming me. i've copied dfs "pimp forest plot" here: credit these graphs max gordon. i've made fake third df called "finland" sake of example here. sweden