Posts

Showing posts from February, 2011

ios - Swift app crashes with (lldb) as only debug output after @IBAction with a UIButton sender -

Image
i see after researching particular debug output isn't super rare, causes can differ pretty greatly. i'm new ios development , have been trying figure out why app crashing, can't crack it. i'm going supply lot of different code snippets, because have hunch what's wrong. i'm partially following along this video tutorial todo list , while differing in ways. notably, chose not start tabbed application template , instead looked way unwind views. here simple object manager class tutorial has create: import uikit var rmndrmgr = remindermanager() struct reminder { var name = "none" var description = "none" } class remindermanager: nsobject { var reminders = [reminder]() func addreminder(name: string, description: string) { reminders.append(reminder(name: name, description: description)) } } below first view controller: import uikit @objc(todolisttableviewcontroller) class todolisttableviewcontroller: ui...

service - Best practice for scehduled background task Android -

i creating notification app, alert user after set reminder notification. current implementation logic is: create service, starts running in background when user opens app. in oncreate() method of service, implementing timer task repeat after 5000ms interval , call method, check reminders set user , notify user if reminder set current time. i use broadcast receiver run service on boot_completed event, if in case user turns off phone. this implementation working good, have faced no issues it, concern is practice? keeping in mind service running , checking every 5 secs consume battery. if user turns on stamina mode, power saving mode or such mode, os kill service. there can give priority service not killed. if there other more efficient way implement sort of task, want implement in project. looking forward suggestions. much appreciated. best approach wakeful intent service alarm receiver mentioned here https://github.com/commonsguy/cwac-wakeful

arrays - How to work with strings from a given java file? -

i'm starting learn java , i'm stuck one, lets have public class info in data there's id of player, first name , last name, league, , last number 1 = hitter , 2 = pitcher, in other 2 attributes hitters , pitchers performance 1st 1 player id , rest numbers calculations , stuff that's no issue. private string[] data = {"30 juan perez yankees american 1", "43 pedro perez braves national 2", "31 carlos maldonado orioles national 1", "44 jose canseco phillips national 1", "45 jesus kilmer orioles national 2", "32 carlos montana braves national 2"}; private string[] hitters = {"30 50 10 3", "31 20 5 10", "44 60 10 10"}; private string[] pitchers = {"43 23.3 4 28", ...

web scraping - Can SPARQL handle blank results for specific cells? -

i writing sparql query , cant figure out how allow blank results specific columns. my current request is: select * { ?game dbpedia-owl:game ; dbpprop:name ?name ; dbpedia-owl:publisher ?publisher . } some games have owl publisher while others not. above request filters out games not have publisher. want able games publisher , games without publisher in same csv. i tried write if isset statements publisher owl cannot seem correct blanks. instead of filtering out games without publisher, want result blank publisher cell. any suggestions? whenever looking might , might not present, can put part of statement in optional part of sparql query. thus: select * { ?game dbpedia-owl:game ; dbpprop:name ?name . optional{ ?game dbpedia-owl:publisher ?publisher . } } the count before optional 112 , after 143.

c - OpenCL / OpenGL Interop using GtkGLArea -

i know looks visit when need have question. building on previous question , ran basic opengl program. i'm adding opencl interop trivial cl script shrinks triangle small amount each time renders. all i'm getting blank screen. commenting out section acquires , releases gl objects allows rendering work before. fails integrate opencl compnent. opencl.h header helper functions use register cl objects , free them single function call in end. edit: 12th june 2015 uncommented /*fprintf(stderr, "error: " x " failed %d\n", cl_stat);*/ line reveals more info: error: set cl kernel arg failed -38 error: acquiring gl objects failed -5 the opencl error code -38 means it's invalid memory object according this list followed out of resources error when trying re-acquire gl objects. here's main.c #include <stdlib.h> #include <stdio.h> #include <string.h> #include <glib.h> #include <gdk/gdkx.h> #include <epoxy/g...

html - Disable browser adding overflow:hidden on touch screen enabled devices -

i'm having issue browsers (maybe chrome) adding css rules on touch enabled devices. on website we've created client (to used exclusively in chrome), when accessing ultrabooks, scroll bars disappear on elements on page had them. client still using these regular laptops, there no need remove scrolling. issue appears fact because have touch screens, browser automatically adds these css rules elements: overflow: hidden; width: auto; this removes scroll bars, , breaks site because many elements can no longer interacted fully. i've done research on , haven't been able find (all results keep getting regarding people wanting overflow:hidden on mobile). hoping there setting in chrome disable this, haven't been able find anything. know possible add forced css rules... might open can of worms. any on appreciated. thanks i found own answer. in chrome, go chrome://flags about 1/3 way down, there setting called ‘enable touch events’. chrome de...

How to implement a JavaFX table with multiple TableViews and Cell Factories? -

i have table list of visible items filtered radio buttons @ top of table. let's radio buttons a, b, c - if if chosen table show items of type a, if b chosen show type b, etc. i create separate tableview instance each selection because users interacting these filtered values in table , editing values etc. have custom cell factory each column in table because rows need highlighted/frozen according user input. so: for (all values a.. c) { createnewtableview(); } private void createnewtableview() { tableview tableview = new tableview(); ... mycustomcellfactory customcf = new mycustomcellfactory(); customcf.settableview(tableview); clmn1.setcellfactory(customcf); ... } my problem when custom cell factory fires, through tell instance of table view belongs to, table view instance not correct one. it's last 1 created. i've verified checking instance id's. so question how can have multiple table view instances custom cell factories , e...

c# - RhinoMock - Use a real object, but stub a single method -

i'm writing unit test against mvc controller has dependency on ifoo . foo (the implementation) has 1 method i'd stub, want leave other intact. how can set using rhinomock ? foo has several dependencies i'd prefer not mock save writing additional lines of code , cluttering test. foo : public interface ifoo{ int method1(); int method2(); } public class foo : ifoo{ //lot's of dependencies public foo(ibar bar, ibaz baz, istackoverflow so){} } test: [test] public void what_i_have_so_far(){ //arrange //load real ifoo ninject (di) var mockfoo = new ninject.kernel(new myexamplemodule()) .get<ifoo>(); //i want test use real method1, not method2 //so stub method2 mockfoo .stub(x => x.method2()) //<---- blows here .returns(42); //act var controllerundertest = new controller(mockfoo); error: using approach, rhinomock throws exception: system.invalidoperationexc...

javascript - Google Maps change Marker data without deleting/creating (MarkerWithLabel) -

i change "labelcontent" , "labelclass" dynamically without deleting marker , creating new one. i know can use markersarray[i].seticon("new-icon.png"); change icon. there equivalents above? my marker: marker = new markerwithlabel({ position: loc, map: map, visible: true, labelcontent: "999", labelanchor: new google.maps.point(30, 33), labelclass: "test-label", labelstyle: {opacity: 1.0}, icon: "image1.png" }); shouldn't markersarray[i]['labelcontent'] = 'new content'; markersarray[i]['icon'] = 'new-icon.png'; work?

regex - PHP not respecting non-capturing group with lookahead with a capturing group inside -

i have php regex match: preg_match_all('/(\d+)(?:\.(?=(\d+)))?/', "43.3", $matches, preg_set_order); which (at least in mi mind) means: match 1 or more numbers group, , if there '.' after group followed group of numbers, match too, ignore '.'. so, possible strings be: 1 23244 24.5 2.454646 but not: 1. now, works in regex101.com test string throw @ it, doesn't seem working php. if var_dump($matches) : array(2) { [0]=> array(3) { [0]=> string(3) "43." [1]=> string(2) "43" [2]=> string(1) "3" } [1]=> array(2) { [0]=> string(1) "3" [1]=> string(1) "3" } } why getting point after 43 ? why getting duplicated? why getting 3 inside first group? the first match full match, though whole pattern wrapped in set of parentheses. don't think can turn off. you're getting 3 in first group becau...

neo4j - Error running cypher query with Python 3.4 -

when run in python 3.4 pyneo 2.0.7 & neo4j 2.2.1 got error typeerror: 'str' object not callable seems right according pyneo documentation here ( http://py2neo.org/2.0/cypher.html ) from py2neo import authenticate,graph authenticate("localhost:7474", "xxxx", "xxxx") graph = graph("http://localhost:7474/db/data") query = "match (n) return n limit 10" result = graph.cypher.execute(query) i solved problem rebooting neo4j server doesn't make me understand happened works.

uitableview - iOS Haneke - memory warning then crash -

Image
i developing app fetches images twitter using haneke library . once images, display them using uitableview. fetch 10 pictures @ time. app loads crashes due memory leak. the code using set images follows. var tweetimage = "http://pbs.twimg.com/media/cge89eqwqaacbxr.jpg" if let var urlstring = tweetimage { var url = nsurl(string: urlstring) cell.tweetimage?.sizetofit() cell.tweetimage?.hnk_setimagefromurl(url!) } when comment out last line cell.tweetimage?.hnk_setimageurl(url!) no longer receive memory warnings , not crash. this first app have ever worked on or made, best way go fixing memory problem? or possibly using haneke library wrong? thanks in advance, above output instruments if helps. func tableview(tableview: uitableview, cellforrowatindexpath indexpath: nsindexpath) -> uitableviewcell { var cell= tableview.dequeuereusablecellwithidentifier("tweetcell", forindexpath: indexpath) as! tweettableviewcell if (indexpath.row % ...

python - How to limit the result of select tag in beautifulsoup? -

for example, have this: result = soup.select('div#test > div.filters > span.text') i want limit result of above list 10 items. in case of find_all() 1 can use limit argument select() ? there no limit argument select() , can slice resultset: soup.select('div#test > div.filters > span.text')[:10]

ios - UITableViewCells not displaying first time -

i'm trying create autocompleter using ios 8, swift , xcode 6.3 i have problem i'm trying solve, gave up... hope can here. problem (custom) uitableviewcell 's not displaying when initial datasource empty. when adding data datasource , reloading tableview , cells should display, don't... @ least, first time don't... second time, do... when initialize table non-empty data, problem doesn't occur. guess goes wrong dequeuereusablecellwithidentifier . in beginning, no reusable cells found, or something. don't know why... relevant code, in viewcontroller.swift: // filteredwords [string] 0 or more items @ibaction func editingchanged(sender: uitextfield) { autocompletetableview.hidden = sender.text.isempty filteredwords = datamanager.getfilteredwords(sender.text) refreshui() } func tableview(tableview: uitableview, cellforrowatindexpath indexpath: nsindexpath) -> uitableviewcell { let cell = tableview.dequeuereusablecellwithidentifier...

ruby on rails 4 - Use rspec to test class methods are calling scopes -

i have created rspec tests scopes ( scope1 , scope2 , scope3 ) , pass expected add tests class method have called controller (the controller calls scopes indirectly via class method): def self.my_class_method(arg1, arg2) scoped = self.all if arg1.present? scoped = scoped.scope1(arg1) end if arg2.present? scoped = scoped.scope2(arg2) elsif arg1.present? scoped = scoped.scope3(arg1) end scoped end it seems bit redundant run same scope tests each scenario in class method when know pass assume need ensure different scopes called/applied dependant on args being passed class method. can advise on rspec test like. i thought might along lines of expect_any_instance_of(mymodel.my_class_method(arg1, nil)).to receive(:scope1).with(arg1, nil) but doesn't work. i appreciate confirmation that's necessary test in situation when i've tested scopes anyway reassurring. the rspec code wrote testing internal implementation of method. sho...

f# - Infer the type information for any arbitrary CSV files? -

i want use following console program type information ( not data ) of csv type provider. file name passed command line argument. however, seems csvprovider<> accept constant literal. is there way workaround it? or possible using f# script? or can f# compiler service help? or there other project this? open fsharp.data open microsoft.fsharp.collections open system [<literal>] let fn = """c:\...\myfile.csv""" // want dynamically set fn arguments [<entrypoint>] let main argv = let myfile = csvprovider<fn>.getsample() // following doesn't work let fn = argv.[0] let myfile = csvprovider<fn>.getsample() // code type information of myfile i think might misunderstanding purpose of csv type provider - idea have representative sample of data available @ compile time (and can use guide type inference). @ runtime, give (possibly different) file same format. gives nice way of handling files k...

r - "arules" library's "read.transaction()" reads in CSV files with an additional, blank column for every transaction -

when attempt read csv files aren't default groceries.csv, every transaction has additional entry in — blank space — mess of calculations analysis (and crash r if csv file big enough). i've tried insert na's of blank cells in csv file, cannot find way remove of them within read.transactions() command (remove duplicates leaves single na). haven't found trustworthy way fix in of other questions on stackoverflow, nor anywhere else on internet. example entry: > inspect(trans[1:5]) items 1 {, facebook.com, google, google web search} it hard say. assume read data read.transactions() . csv file have leading white spaces in some/all lines? try use cols parameter in read.transactions() fix problem. an example data , code replicate problem help.

javascript - Detecting events in embedded youtube iframe? -

i want: detect events in youtube iframe. examples click , touchstart. my problem: codepen i get uncaught securityerror: failed read 'contentdocument' property 'htmliframeelement': blocked frame origin " http://s.codepen.io " accessing frame origin " https://www.youtube.com ". frame requesting access has protocol of "http", frame being accessed has protocol of "https". protocols must match. i guess problem comes being logged youtube. my code: html <iframe id="someid" width="560" height="315" src="http://www.youtube.com/embed/tbajs14t6gw" frameborder="0" allowfullscreen></iframe> js $("#someid").load(function(){ var iframe = $("iframe").contents(); console.error(iframe.find("body").length + "error happens above"); $("iframe body").on("click", function(){ alert(...

python - Animating quiver in matplotlib -

i followed suggested code in response question, plotting animated quivers in python , i'm finding have problem 1 did not address. consider following code: from matplotlib import pyplot plt import numpy np import matplotlib.animation animation def ufield(x,y,t): return np.cos(x+y)*np.sin(t) def vfield(x,y,t): return np.sin(x+y)*np.cos(t) x = np.linspace(0,10, num=11) y = np.linspace(0,10, num=11) x,y = np.meshgrid(x,y) t = np.linspace(0,1) def update_quiver(j, ax, fig): u = ufield(x,y,t[j]) v = vfield(x,y,t[j]) q.set_uvc(u, v) ax.set_title('$t$ = '+ str(t[j])) return q, fig =plt.figure() ax = fig.gca() u = ufield(x,y,t[0]) v = vfield(x,y,t[0]) q = ax.quiver(x, y, u, v) ax.set_title('$t$ = '+ str(t[0])) ax.set_xlabel('$x$') ax.set_ylabel('$y$') ani = animation.funcanimation(fig, update_quiver, frames = range(0,t.size), interval=1,fargs=(ax, fig)) plt.s...

swing - Many copies of "Applet started" string in java applet -

i created applet using threads. when run , change size of window see few copies of "applet started" string. wonder why , how fix that? when strin starts? here code: import java.awt.color; import java.awt.graphics; import java.awt.graphics2d; import java.util.random; import javax.swing.japplet; public class app extends javax.swing.japplet { /** * */ random generator = new random(); public int n = 15; public int m = 15; public int k = 200; public int size = 25; public kwadrat[][] watki; public double p = 0.98; public boolean sth = true ; /** * function initializes threads given data * @exception numberformatexception when there no data html code * */ public void init(){ try{n = integer.parseint(getparameter("n"));} catch( numberformatexception e){ system.out.println("nieprawidłowy parametr: n"); } catch( nullpointerexception e){} try{m = integer...

Laravel 5 Model Accessor Displayed as Undefined Variable -

i have following laravel model class , have accessor location name follows (not sure if correct syntax) class job extends model { public function location() { return $this->belongsto('app\location'); } public function getlocationnameattribute() { return $this->location('name'); } } in form have following: {!! form::text('location_name', $locationname !!} but error undefined variable: locationname when try view page. the location table has 2 columns(id, name) , want name of location associated job. how do this. in job table store location_id. can follows isset($job->location_id) ? $job->location->name : '' i'm trying understand how can achieve same using accessor. can 1 shed light please.

javascript - Refreshing DOM between click events -

i have click event: $('#undoall').click(function(){ $('#prospecttable tbody tr td a:not(.invisible)').each(function(){ $(this).trigger('click'); }) }); which calls individual click events. the inner click events in above code make changes dom. these changes appear after each individual inner click event user can see things happening (the outer click event can take 30 seconds complete). unfortunately, no changes dom made until click events processed. is there can force dom refresh after each inner click? any appreciated. after many hours of experimenting following seems achieve precisely desired effect. $('#undoall').click ( function() { if($('#prospecttable tbody tr td a:not(.invisible)').length > 0) { $('#prospecttable tbody tr td a:not(.invisible)').first().click(); settimeout ( function() { ...

javascript - Backbone Model fetch steps on loading indicator in Chrome & IE -

we have app shows loading.gif while fetching models data via backbone. code pretty looks like: $('.loading-indicator').show() mymodel.fetch({async: false}) setsomeothervar = date.today() //some var unrelated fetch $('.loading-indicator').hide() this works fine in ffx, in chrome , ie loading indicator disappears when fetch called. can see stepping through w/ debugger. if set breakpoint on fetch indicator there, , disappears when fetch called. fetch successful , there no errors in console. any insight appreciated i found answer , works me. removed {async: false} and solved me. mentioned @alexander derck, try removing asynchronous , should work.

mongodb - Cannot remove last field from input in panel -

in flask panel have class inherits embedded document , have inside persons = db.listfield(db.referencefield('person', required=false, null=true), default=[], required=false) when want remove last person input field via flask admin panel saves document not remove, when have 2 can remove one, cannot stay empty when try remove second. tried different combinations flags , put breakpoints in pre_save , post_save in both cases when remove last person shows person still inside. how remove constraint form ? it seems nothing happens on flask-admin side when submit form empty list. did trick using on_model_change method, in case : def on_model_change(self, form, model, is_created): if not 'persons' in request.form : model.persons = []

Android Fragment + AsyncTask -

in fragment i'm using 'asynctask' retrieve data url. main purpose of code access data (via asynctask) , pass 'jsonarray' fragment. problem is, on fragment side, when check variable should have result error saying variable null. here code: public class myfragment extends listfragment { //this variable should have result asynctask jsonarray myresult = null; @override public view oncreateview(layoutinflater inflater, viewgroup container, bundle savedinstancestate) { (...) //execute asynctask new getresult().execute(email, password); (...) } //the asynctask private class getresult extends asynctask<string, void, jsonarray> { @override protected jsonarray doinbackground(string... params) { (...) jsonarray jsonarray = (jsonarray) json.get("customer"); return jsonarray...

How can i find certain types of buildings in OpenStreetMap? -

i'm trying make list of police stations in openstreetmap.org can compare mine (a full 1 police stations in country) , add ones not there. @ moment i'm doing 1 one, searching list , if not in map add it. want if there way make map show me police stations in country or region. if knows osm me great to find policestations can use e.g. overpass-api (i recommend turbo ). more complex way use planet.osm dump / extracts , process using filterers (e.g. osmosis). last 1 more complex, allows controll area more precise. please aware building wrong feature. mappers prefer map amenity / usage seperate poi , policestations mapped whole site of station. aware community skeptical imports , quality of external datasets.

Powershell find common strings varying number of arrays -

question follow powershell find common string in multiple files following powershell code goes through directory for each file, extract ip addresses , store in multi-dimensional array $match after iteration, go through each element in multi-dimensional array , split space, , store multi-dimensional array $j i able find intersection between $j[0] , $j[1] , i'm not sure how iteratively, on elements of $j , array of ip address arrays. see code $i = $null $match = @() $j = @() $input_path = $null $output_file = "d:\script\common.txt" $directory = "d:\script\files" $regex = ‘\b\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\b’ get-childitem $directory | foreach-object{ $input_path = $directory + "\" + $_.name write-host $input_path $match += ,@(select-string -path $input_path -pattern $regex -allmatches | % { $_.matches } | % { $_.value }) } foreach ($i in $match){ $j += ,@($i.split(" ")) } $j[0] | sort | select -uniqu...

Android - Create a settings object similar to volume control -

as title says, wondering if there way add way create input in android application, providing user bar similar 1 used android system adjusting sound volume. specific variable change value, according position of "button" on bar (sorry english). advice on that? a seekbar looking for. here design spec: https://www.google.com/design/spec/components/sliders.html# here reference page: http://developer.android.com/reference/android/widget/seekbar.html if want set value of position of seekbar , do: seekbar.setprogress(position); where position want seekbar be. getting position of seekbar bit more involved. firstly must set setonseekbarchangelistener , grab seekbar value within onprogresschanged method. stackoverflow question answers well: get android seekbar value , display on screen

r - How do I take a rolling product using data.table -

dt <- data.table(x=c(1, .9, .8, .75, .5, .1)) dt x 1: 1.00 2: 0.90 3: 0.80 4: 0.75 5: 0.50 6: 0.10 for each row, how product of x row , next 2 rows? x prod.3 1: 1.00 0.7200 2: 0.90 0.5400 3: 0.80 0.3000 4: 0.75 0.0375 5: 0.50 na 6: 0.10 na more generally, each row, how product of x row , next n rows? you can try library(zoo) rollapply(dt, 3, fun = prod) x [1,] 0.7200 [2,] 0.5400 [3,] 0.3000 [4,] 0.0375 to match expected output dt[, prod.3 :=rollapply(x, 3, fun=prod, fill=na, align='left')]

git - What does interdiff do that diff cannot? -

if i'm trying find diff between 2 diffs, why can't diff 2 diffs? i have tested diff diff1 diff2 , interdiff diff1 diff2 , have not found difference in output. in case different? (i aware interdiff's stated purpose find changes between 2 patches.) interdiff - show differences between 2 diff files interdiff creates unified format diff expresses difference between 2 diffs. diffs must both relative same files. best results, diffs must have @ least 3 lines of context. an interdiff text file in patch format describes changes between 2 versions of patch. using interdiff s best practice saves time , reduces tedium reviewers allowing them focus on changes introduced in patch iterations. you should supply 1 whenever update significant patch in issue queues (it ignored drupal.org testbots, make sure upload full patch too). create interdiff using git //always pull latest changes. git pull --rebase //create branch old patch. git checkou...

java - Execution failure in Android app for task ':app:dexDebug' -

i new android studio , making simple weather app. wrote code still getting error: execution failed task ':app:dexdebug'. com.android.ide.common.process.processexception: org.gradle.process.internal.execexception: process 'command '/usr/lib/jvm/java-7-openjdk-amd64/bin/java'' finished non-zero exit value 2 here build.gradle: apply plugin: 'com.android.application' android { compilesdkversion 22 buildtoolsversion "22.0.1" defaultconfig { applicationid "com.example.aseem.sunshine.app" minsdkversion 10 targetsdkversion 22 versioncode 1 versionname "1.0" } buildtypes { release { minifyenabled false proguardfiles getdefaultproguardfile('proguard-android.txt'), 'proguard-rules.pro' } } } dependencies { compile filetree(dir: 'libs', include: ['*.jar']) compile files('android-support-v7-appcompat.jar') compile 'com.android....

gpgpu - OpenCL strange behavior -

good day, i think i've tried figure out problem couldn't. have following code host: cl_mem cl_distances = clcreatebuffer(context, cl_mem_read_write, 2 * sizeof(cl_uint), null, null); clsetkernelarg(kernel, 0, sizeof(cl_mem), &cl_distances); cl_event event; clenqueuendrangekernel(command_queue, kernel, 1, null, &global_workers, &local_workers, 0, null, &event); clwaitforevents(1, &event); and device: __kernel void walk(__global uint *distance_results) { uint global_size = get_global_size(0); uint local_size = get_local_size(0); uint global_id = get_global_id(0); uint group_id = get_group_id(0); uint local_id = get_local_id(0); (uint step = 0; step < 500; step++) { if (local_id == 0) { distance_results[group_id] = 0; } barrier(clk_local_mem_fence); (uint n = global_id; n < 1000; n += global_size) { if (local_id == 0) { atomic_add(&distanc...

ios - How to query an PFFile By Creation Date -

i using code retrieve images parse data... if let userpicture = object.valueforkey("image") as? pffile { userpicture.getdatainbackgroundwithblock({ (imagedata: nsdata?, error: nserror?) -> void in if (error == nil) { let image = uiimage(data:imagedata!) self.imagearray.insert(image!, atindex: 0) } else { self.alert("error: \(error!) \(error!.userinfo!)", message: "make sure have secure internet connection") } dispatch_async(dispatch_get_main_queue()) { println("finished pictures") } }) } and using code retrieve string parse: var stuffarray = [string]() var query = pfquery(classname:"classname") query.findobjectsinbackgroundwithblock { (objects: [anyobject]?, error: nserror?) -> void in if error == nil { // find succeeded. println("...

sql server - Stored procedure with dynamic query "Error" -

what wrong code getting error while executing application msg 156, level 15, state 1, line 11 incorrect syntax near keyword 'and'. and here code. appreciated. alter procedure [dbo].[usp_reportlist] @paccounttype varchar(35)=null, @pfromdate datetime=null, @ptodate datetime=null, @paccountid int=null, @puserid int=null, @pteamid int=null begin set nocount on; declare @strsql nvarchar(4000) set @strsql =' select orderinfoid, borrowerfirstname, borrowerlastname, requestedurl, requests, customeruserid lenderid , o.requestipaddress originatingipaddress, o.requests status orderinfo o ' if(@paccounttype = 'lender') begin set @strsql += 'inner join [user] u on o.customeruserid = u.uid 1=1' end else if(@paccounttype = 'affiliate') begin set @strsql += 'inner join [user] u on o.affiliateid = u.uid 1=1' end if(@pfro...

pentaho - ETL in Amazon EC2 and utilization doubts -

i using pentaho sometime. have basic question on etl infrastructure. need run job on remote ec2 instance extract data multiple database around 2000. need have machine capable doing in ec2. etl ec2 serving process point , storage in host.now need know instance should go in amazon. these etl jobs have select query , put in table output. no complex transformation , no sorting. etl processes cpu intensive or memory intensive?. how decide whether etl process cpu or memory intensive or i/o intensive? i upto you, using m3.medium instance according data in database , fine, if have no problem amount of time take execute transformation choose small size instance or go higher instance.

ruby on rails - Using s3 in a healthcare application, private links -

we develop rails-based healthcare application. best way configure our s3 implementation authenticated user has access image? from documentation ,you should use 1 of amazon's "canned" acls . amazon accepts following canned acls: :private :public_read :public_read_write :authenticated_read :bucket_owner_read :bucket_owner_full_control you can specify acl @ bucket creation or later update bucket. # @ create time, defaults :private when not specified bucket = s3.buckets.create('name', :acl => :public_read) # replacing existing bucket acl bucket.acl = :private

c# - asp.Net how to set left side of a button? -

i have web control button on web form. in code behind c# want move 10 pixels left. how it? something this: button buttonb = new button(); buttonb.attributes.add("style", "margin-left:10px");

eclipse - Camel-fop does not work properly with ServiceMix 5.4.0 - error creating XSL-FO -

i try use camel-fop servicemix. made route in eclipse, test in eclipse - ok. but after deploying in servicemix i've got error: "javax.xml.transform.transformerexception: org.apache.fop.fo.validationexception: element "fo:simple-page-master" missing required property "master-name" here part of xsl-fo (from servicemix log) - incorrect one: <?xml version="1.0" encoding="utf-8"?> <fo:root xmlns:fo="http://www.w3.org/1999/xsl/format" xmlns:fox="http://xml.apache.org/fop/extensions"> <fo:layout-master-set> <fo:simple-page-master> <fo:region-body/> </fo:simple-page-master> <fo:simple-page-master> <fo:region-body/> </fo:simple-page-master> <fo:page-sequence-master> <fo:repeatable-page-master-alternatives> <fo:conditional-page-master-reference/> <fo:conditional-page-master-reference/> </fo:repeatable-page-master-alternatives> </fo:...