Posts

Showing posts from July, 2013

c++ - What is the correct Big O of this code -

i'm trying learn big o notation , i'm little confused c++ code: void enterelements(int *s1, int s1size) { for(int x = 0;x < s1size;++x) { retry: cout<<"element "<<x + 1<<": "; cin>>s1[x]; int valid = validation(); if(valid == 1) { cout<<"the input must numbers."<<endl; goto retry; } } } because don't know how got 3 results: 9n + 1 -> o(n) 7nm + 2m + 2n + 1 -> o(nm) 7n^2 + 4n + 1 -> o(n^2) is of correct? if not, can me find correct answer? int validation() { int validation = 0; if(cin.fail()) { validation = 1; cin.clear(); cin.ignore(std::numeric_limits<std::streamsize>::max(),'\n'); } else validation = 0; return validation; } big-oh notation isn't applicable here. have lower bound, there absolutely no gurantees on validation(), big-oh designation o(in

c++ - Boolean function -

i trying use find_if boolean function return true if: z =<10; name="john" (all lower case) my code: /* predicate find_if */ bool exam_pred(const exam_struct &a) { if ((a.z=<10)&&(a.name="john")) { return true; } } exam_struct{ int x,y; double z; string name; }; it doesn't compile when set a.name="john" . question how implement a.name="john"; boolean? you should indeed use == operator. i wrong suggesting strcmp before, since using strings. code: struct exam_struct { int x, y; double z; string name; }; /* predicate find_if */ bool exam_pred(const exam_struct& a) { return a.z <= 10 && a.name=="john"; } note in original code not return false when check false.

php - pdo query only works the first time -

i have searched , searched, can't find i'm doing wrong, here's first stackoverflow question. i attempting make query entity table information entity, including id corresponding address on address table, can make 1 query. second query gives error "no database selected". testing, have tried using exact same function twice make sure it's not syntax error , result get: name:wolf, dmitri second try same query: no database selected from code: $entity_id=1; $row = getentitybyid($entity_id); echo "<p>name:" . $row['entity_name'] . "</p>"; echo "<p>second try same query:</p>"; $row = getentitybyid($entity_id); echo "<p>name:" . $row['entity_name'] . "</p>"; function dbconnect () { require_once ('dogs.php'); try { $conn = new pdo("mysql:host=$host;dbname=$db", $user, $pwd); return $conn; } catch (pdoexcept

c# - How to store a reference to a property -

is there way store reference property variable allow me access if accessing objects property, so: var referencevariable = object.property; referencevariable = "something"; if (object.property == "something") //it worked! yaay! if so, how go doing that? edit: bit of clarity, going on: private void updatecolor(){ if (radiobutton1.checked){ object.color1 = color.red } if (radiobutton2.checked){ object.color2 = color.blue } . . . if (radiobuttonn.checked){ object.colorn = color.colorn } } this sub-optimal. ideally issue handled in function fires when radio button changed, like... private void radiobutton_checkchanged(object sender, eventargs e){ //something done here tell program interested in object.color...whatever } private void updatecolor(){ //now know color we're looking at, can in 1 step rather looking @ thousand (i exaggerate of course) radio buttons checked states. }

sql server 2008 - Updating a column based on 3 tables and 2 rules -

i have 3 tables follows: declare @tablea table (id int, name varchar(2)); declare @tableb table (name varchar(2)); declare @tablec table (id int, name varchar(2)) insert @tablea(id, name) select 01, 'a4' union select 01, 'sh' union select 01, '9k' union select 02, 'm1' union select 02, 'l4' union select 03, '2g' union select 03, '99'; insert @tableb(name) select '5g' union select 'u8' union select '02' union select '45' union select '23' union select 'j7' union select '99' union select '9f' union select 'a4' union select 'h2'; insert @tablec(id) select 01 union select 01 union select 01 union select 02 union select 02 union select 03 union select 03; basically, @tablec.id populated @tablea.id (same rows) now, have populate @tablec.name considering

javascript - Monitoring sub-task for grunt-contrib-watch -

i have following gruntfile.coffee. monitoring watch task shown below see file changes , compile changed file coffee-script. # watch task watch: coffee: files: ['client/**/*.coffee','server/**/*/.coffee'] options: nospawn: true livereload: true # watch changed files grunt.event.on 'watch', (action, filepath) -> cwd = 'client/' filepath = filepath.replace(cwd,'') grunt.config.set('coffee', changed: expand: true cwd: cwd src: filepath dest: 'client-dist/' ext: '.js' ) grunt.task.run('coffee:changed') however, add watch task copy files on not coffee files. how monitor these changes? i thought of doing # watch copy task grunt.event.on 'watch:copy', (action,filepath) -> ... # watch coffee task grunt.event.on 'watch:coffee', (action,filepath) -> ... but doesn't seem work. ideas? my solution - gets job done isn't pretty. welcome be

WCF trace logs all exceptions except System.Exception itself -

i've made basic wcf service library , created 1 method called getresult() . i've set wcf trace logging log warnings file. correctly logging exceptions thrown except , strange reason, system.exception itself. instance, logs fine: [operationcontract] public string getresult() { // exception logged in file: throw new dividebyzeroexception(); // or // throw new applicationexception(); // or // throw new filenotfoundexception(); // or else, seems } but not log anything: [operationcontract] public string getresult() { // exception not logged! throw new exception(); // or // throw new exception("my message"); } in latter case, log file doesn't created. if exists doesn't written to. what doing wrong? here app.config setup: <system.diagnostics> <sources> <source name="system.servicemodel.messagelogging" switchvalue="warning"> <listeners>

php - Website doesn't display pages as requested until Control+F5 -

i have strange situation here. i had coded webpage in php. works fine throughout day if close down , try access again following day doesn't quite work needed. for example: have main login page. when user logs in url changes following page still shows login input. if manually enter url again , press ctrl + f5 original page. if press on logout page calls logout.php url change still shows me index page until manually entere url , press ctrl + f5 force refresh. once pages have been accessed way website starts working fine again. i have put headers not cache webpages not helping here. it happens browsers. any advice or sounding bit stupid here? header("cache-control: no-cache, must-revalidate"); header("expires: mon, 26 jul 1997 05:00:00 gmt"); session_start(); if(isset ($_session['user'])) { echo "logged in as:".$_session['user']; echo "<a href=\"index.php\">home</a>"; echo "<a h

Is it possible to preload data by default, to the target database from MySQL Workbench? -

there tables, not change: country (id / name / abbreviations) ips countries (id / ip range) during development, every time modify on database have preload these tables manually newly created database. is there way query these datas automatically tables @ every forward engineer process in mysql workbench? each table in mysql workbench model file has section called "inserts". open table in table editor , click tab labeled "inserts". there can add many records wish , data applied when forward engineer model.

User input to linux command in C -

#include <stdlib.h> #include <stdio.h> #include <unistd.h> #include <sys/types.h> #include <sys/wait.h> #include <time.h> #include <string.h> void getcommand(char* cmd, char** arg_list) { pid_t child_pid; child_pid = fork(); if (child_pid == 0) { execvp (cmd, arg_list); fprintf(stderr, "error"); abort(); } } int main(void) { printf("type command\n"); char *arg_list[] = {null, null, null, null, null, null, null}; char cmd[20]; char delim[2] = " "; char *token; scanf("%[^\n]", cmd); token = strtok(cmd, delim); while (token != null) { arg_list[0] = token; token = strtok(null, cmd); } getcommand (arg_list[0], arg_list); return 0; } what i'm trying achieve here want read user input, should linux command, , execute command. seems can't use strtok split string. i'm kinda lost, help. your successive calls strtok wrong. need pass delimiters. also, writi

angularjs - How to do e2e test on formatted result? -

i using filter format number, how go testing in e2e? <td>{{unformattednumber | number: 2}}</td> i can write test value of unformattednumber using binding. not sure, how value of td element? suppose name td element , using jquery, , compare? thanks

ember.js - Trouble with transitionTo route after adding a new record using ember data and Parse -

i'm learning ember , ember data extending example blog app ember guides page, , having difficulty implementing "new" route adding new blog entries. i'm using ember data adapter parse persist data. have connected parse , can query , update records in parse. created "new" route , can create new post, have 2 problems: 1) route new posts adds post on parse, won't redirect post route after has been saved. gives me error "uncaught error: assertion failed: cannot call 'id' on undefined object.". i've tried variations of transitionto('posts.post') , other options stumped on how redirect post detail new post. here's postsnewroute: app.postsnewroute = ember.route.extend({ model: function() { return app.post.createrecord(); }, events: { createpost: function() { this.get('store').commit(); this.transitionto('post'); } } }); 2) type in title of new post

regex - What does the this javascript regular expression do?: "var match = self.location.href.replace(/\/$/i, '');" -

i saw expression in codebases library part of following sequence: var url = sel.anchornode.parentnode.href; var match = self.location.href.replace(/\/$/i, ''); var replaced = url.replace(match,''); it suggest regular expression might strip of trailing path reutrn base url created fiddle test theory , doesn't seem check out. http://jsfiddle.net/funkyeah/weqzz/ it strips trailing slash. single slash /

javascript - Expand/Collapse a div element? -

i want show content box (say div) specified height default. there link "more/less" @ bottom when clicked, want show full content of content box. "more" name of link change "less". please give hint. possible in yui or better if standalone js? the anim module in yui provides need. if here @ reversing animation example shows how that. here source that. <div id="demo" class="yui3-module"> <div class="yui3-hd"> <h3>reversing animation</h3> </div> <div class="yui3-bd"> <p>click icon in header toggle element's height.</p> </div> </div> <p>this placeholder text used demonstrate how above animation affects subsequent content.</p> <script type="text/javascript">type="text/javascript"> yui().use('anim', function(y) { var module = y.one('#demo'); // add fx plugin module body var co

ms access - Emulate SQL Server connector in Python? -

Image
i little confused pyodbc syntax. want create couple of functions generate different strings configured different authentication types; pushing pyodbc. here sample connect dialogue, , can see, want support windows authentication , sql server authentication: how programmatically generate these connection strings? the connectionstrings.com page at http://connectionstrings.com/sql-server-2008#sql-server-native-client-10-0-odbc-driver lists several odbc connection strings accommodate various options might want use. comment... i not sure how find sid , other connection details sql server ...i'm not sure intend do, knowing sql server sid of given user unlikely connected sql server instance. (it's not terribly clear access has got of this....)

android - passing null value as a parameter in java -

i have method insert datas sq-lite db public long insertdetails(int id,string batchname,double weight, double yield) { contentvalues insertcontentvalues = assesmentinsertvalues(id,batchname,weight,yield); return this.data.insert("tb_labassessment", null, insertcontentvalues); } from main class m passing values parameter above function, in cases want pass weight , yield null values. string batchname; double weight; double yield; dbadapter.insertassesmentdetails(objclsproduct.getid(),batchname,weight,yield) how can pass values of weight , yield null here. you can't pass primitive null. there's 2 ways this- first make function take double- class version of double. other pass in unused value, such -1, mean null. requires there reasonable default value though.

Include certain .jar for javacv project -

it's simple question. can include .jar files javacv library project? mean not .jar files. thanks before guys. (: yes, there no need add javacv library files. include following jar files. javacpp.jar javacv.jar javacv-linux-x86 (for linux 32bit os) javacv-linux-x86_64 (for linux 64 bit os) javacv-macosx-x86_64 (for mac os) javacv-windows-x86 (for windows 32bit os) javacv-windows-x86_64 (for windows 64bit os)

python - Finding words around a substring -

i have extract 2 words before , after substring match in large string. example: sub = 'name' str = '''my name avi. name identifies are. important have name starting letter a.''' now have find occurences of sub in str , return following: (my name avi), (name identifies who), (have name starting with) note if re full stop after string words before string returned shown in example above. what have tried? >>> import re >>> text = '''my name avi. name identifies are. important have name starting letter a.''' >>> m in re.finditer( 'name', text ): ... print( 'name found', m.start(), m.end() ) which gives me starting , ending position of matched substring. not able proceed further how find words around it. import re sub = '(\w*)\w*(\w*)\w*(name)\w*(\w*)\w*(\w*)' str1 = '''my name avi. name identifies are. important have name starting letter a.&#

Android library project is not getting included in Gradle build -

this query continuation previous question did not answer requesting here. previous question can found here ( android - gradle multiproject include , exclude libraries ) with productflavors, 1 can avoid include , exclude library projects main project. in case, projecta----- mainproject, liba ---- library project, libb ---- library project, .... liba classes used in projecta. libb classes not used where. library required part of projecta.apk(mentioned in projecta manifest file) after "gradle build", in build/classes/flavor/debug or release/packagename/.. liba classes there. libb classes not there in build/classes/.. path , libb functionality not working. (note: same working fine eclipse build) libb classes getting included if importing libb classes in projecta libb plug , play type library , not required time. libb build.gradle file follows: buildscript { repositories {mavencentral()} dependencies { classpath 'com.android.tools.bui

oracle10g - how to SAVE many values in one field/column of one row in oracle database? -

i want keep track of individual's credit card transactions(the amount, in essence). instead of having new entry made in database each transaction, there way can save transactions of 1 person on single row? i.e. , if person makes purchases of rs.1500, rs. 2600 , rs. 3200 @ different instances, want table entry this: a : 1500, 2600, 3200 also, there way can keep number of entries? meaning, 1 new entry added, 1 oldest entry should deleted. i'm using oracle 10g. please me out. thank you. can you? well, define column varchar2 or clob , write comma-separated list of values column. mean have write code parse data every time selected it. , write code things removing or modifying 1 element in list. , you'd lose benefits of proper data typing. , of proper normalization. , you'd really, annoy whoever has support code in future. particularly when inadvertently stores transaction value of 1,000 rather 1000 in comma-separated string column. so can, yes. c

java - Hiding events in p:schedule with css -

i hava p:schedule shows 2 sorts of events. list events filled try method this: //resourceevents eventresourceavailperday.addevent(new defaultscheduleevent(reason, datebeginconverted, dateendconverted, "resource")); //waitingitemevents defaultscheduleevent newresourceevent = new defaultscheduleevent(reason, dtebeginorwaitingitem, dteendorwaitingitem, orwaitinglist.getwkey()); newresourceevent.setstyleclass("waitingitem"); eventresourceavailperday.addevent(newresourceevent); the 2 events has following css-classes created above: resource , waitingitem the following trying achieve: in month view want waitingitem class visible, hiding resource class, if possible override jsp 2.0 these events( waitingitem ) non-clickable. in weekview , dayview resource class should visible i have following css code not give me result want: .waitingitem, .schedule .waitingitem .fc-view-month, .waitingitem { display: none; } .waitingitem, .schedule .waitingitem .fc

c++ - cv::goodFeaturesToTrack gives the corner vector size as zero -

i trying opencv cv::goodfeaturestotrack corner points. did following code. output corner vector size 0 corners capacity changed. using namespace cv; void main() { mat img = imread("cameraman.tif",cv_load_image_grayscale); std::vector<point2f> corners; cv::goodfeaturestotrack(img,corners,10,0.01,10); std::cout<<corners.size()<<endl; } the output 0

windows phone 7 - Custom protocol in wp7 -

how make custom protocols work in windows phone 7? know achievable in windows store app using protocol declaration. possible in windows phone 7 well? it isn't possible on windows phone 7. registering custom uri scheme feature added in wp8 sdk.

objective c - URL arrays saving -

i have nsmutablearray , put urls in array. there no problem when save nsuserdefaults doesn't keeps content when load after closing app. i tried convert url string doesn't save other nsmutablearrays have work strings i using xcode. can me? the reason not able store array of urls in nsuserdefaults is, allows primitive data object storing, while nsurl not premitive datatype. //define url nsurl *myurl = [nsurl urlwithstring:@"www.google.com"]; nsmutablearray *urlarr = [[nsmutablearray alloc] initwithcapacity:0]; //add array for(int i=0;i<5;i++) [urlarr addobject:[myurl absolutestring]]; // convert nsurl nsstring [[nsuserdefaults standarduserdefaults] setobject:urlarr forkey:@"myurlarr"]; [[nsuserdefaults standarduserdefaults] synchronize]; nsmutablearray *array = [nsmutablearray arraywitharray:[[nsuserdefaults standarduserdefaults] objectforkey:@"myurlarr"]]; for(nsstring *urlstring in array) nslog(@"%@",

android - setLayoutParams does not display things correctly -

Image
when i'm setting layout parameters xml, works fine. when i'm trying set layout parameters programmatically, works wrong. did failed? i need set parameters in linearlayout, here is: <linearlayout android:id="@+id/buttons_layout" android:layout_width="231dp" android:layout_height="40dp" android:layout_margintop="40dp" android:layout_marginright="85dp" android:layout_alignparentright="true" android:layout_alignparenttop="true" android:orientation="horizontal" android:baselinealigned="true" android:weightsum="603" > and here code set params: rl = (linearlayout)findviewbyid(r.id.buttons_layout); lp = new relativelayout.layoutparams(pixelsfromdp(231), pixelsfromdp(40)); lp.addrule(relativelayout.align_parent_right); lp.addrule(relativelayout.align_parent_top); lp.setmargins(0, pixelsfromdp

android - Trying to download traineddata files(Tesseract) -

i'm trying download file: tesseract-ocr-3.02.eng.tar.gz on android commands: httpurlconnection urlconnection = null; urlconnection = (httpurlconnection) url.openconnection(); urlconnection.setallowuserinteraction(false); urlconnection.setinstancefollowredirects(true); urlconnection.setrequestmethod("get"); urlconnection.connect(); from url = " https://tesseract-ocr.googlecode.com/files/tesseract-ocr-3.02.eng.tar.gz "; , not working. throwing unknownhostexeception , error coming last command urlconnection.connect(); what can fixing , download file?

c# - itextsharp output string with multiple rows -

this reference pdf trying replicate. http://www.depo.com.tw/asp/pdf/r_vw_pasat_2.pdf i working on pdf catalog , trying output red-text area. as guys can see in pdf, outputting letters 441-11b2-ldhem straightforward. however, outputting 441-11a7-ld/rd-em1 not. private void placechunck(string text, int x, int y) { pdfcontentbyte cb = writer.directcontent; cb.savestate(); cb.begintext(); cb.movetext(x, y); cb.showtext(text); cb.endtext(); cb.restorestate(); } all can think of place chunk @ corresponding areas. length process , requires calculation of charaters... i wondering if know how in easier way? thanks. ok, understand question. the best way this, create small pdftemplate object, , add ld , rd @ correct place (one above other). wrap pdftemplate inside image object, , wrap image inside chunk (maybe y offset). can create phrase "441-11a7-", followed image chunk, followed "-em1". unfortunately, that

android - emailVerification = false in parse -

Image
hi trying use parse api's database project requires user accounts parse provides. while reading tutorial on how set user accounts @ https://parse.com/docs/android_guide#users stated: "enabling email verification in application's settings allows application reserve part of experience users confirmed email addresses. email verification adds emailverified key parseuser object. when parseuser's email set or modified, emailverified set false. parse emails user link set emailverified true." how add emailverification key = true whenever user tries register: parseuser user = new parseuser(); user.setusername(username); user.setpassword(password); user.setemail(email); user.signupinbackground(new signupcallback() { public void done(parseexception e) { if (e == null) { // sign succeeded go multiplayer screen // store username of current player currentuser = username; final string title = "account

nlp - FrameNet and NLTK -

i have classify semantic relation of words in sentences. i thinking use framenet not sure if nltk (python) provides framenet along it. anyone know if possible use framenet nltk? any suggestions? it looks framenet package nltk coming out - https://www.icsi.berkeley.edu/icsi/events/2013/09/framenet-workshop?goback=.gde_131222_member_265383400# !

mailmerge - CRM 2011 isn't passing values to word for a Mail Merge -

Image
i'm trying mail merge working dynamics crm 2011 when word opens, screen doesn't seem pass on of data. this when using contact entity , when trying use first , last name simple example. i have attached screenshot of mappings no data being displayed. any ideas on cause this? note: had issue 8 months ago changed managed unmanaged solution , seemed start working, has since stopped working again. ok simple error on behalf. haven't used mail merge crm before , therefore wasn't aware of send marketing mail field, not set of our contacts, meaning know 1 in list. so in fact values being passed on along, mail merge excludes people don't have marketing option set true. makes sense!

php - How to use zend_http_client or curl in right way -

i'm using zend_http_client. want send request transfer(without redirecting) site , send number in field have , answer info need use on site. that's i'm doing, how send number field , submit it? $url = 'http://gdeposylka.ru/'; $config = array( 'timeout' => 30 ); $client = new zend_http_client($url, $config); try { $response = $client->request('get'); if ($response->getstatus() == 200) { $ctype = $response->getheader('content-type'); $body = $response->getbody(); $dom = new zend_dom_query($body); $results = $dom->query('limit'); $item->site_k = 1 + (int) $results->current(

testing - Actions and Expected result are disabled in TFS 2010? -

i trying write first test case using tfs 2010 in vs2010 actions , expected results columns won't allow me add steps ... thing doing wrong ? http://www.microsoft.com/visualstudio/eng#products/compare the link referring visual studio 2012 editions, same 2010. means steps can done in microsoft test manager, part of ultimate , test edition in 2010. in 2012 available in premium edition. to solve problem need install correct edition , use test manager. there should button in visual studio says "edit microsoft test manager".

php - Code Navigation in yiiclipse -

i used yiiclipse plugin in php project building. installed in eclipse (with pdt). code completion works nice. , found code navigation introducing in web site of yiiclipse. can't find trigger these features in eclipse. told me or how feature work? thanks. mostly future visitors: install yiiclipse . in php explorer in eclipse, right click project name->configure->toggle yii support. should automatically add following .project file (present in root folder): <buildspec> ... <buildcommand> <name>org.maziarz.yiiclipse.builder</name> <arguments> </arguments> </buildcommand> </buildspec> <natures> <nature>org.maziarz.yiiclipse.nature</nature> ... </natures> then, right click on project again->properties->php include path->libraries->add external source folder. here select folder installed yii framework.

javascript - Change image path src to data-src on Drupal 7 -

i want use lazyload plugin. searched modules jquery plugin don't work me. moreover, use many options. so, first rule: latest version of lazy load not drop in replacement webpage. new browsers load image if remove src attribute javascript. must alter html code. put placeholder image src attribute of img tag. real image url should stored data-original attribute. thing can put javascript end of page. if want support non javascript browsers there step. must include original image inside tag. read documentation below. but don't know how can this? possible javascript? or soluitons? most images go through theme_image() , can override in theme's template.php file so: function mytheme_image($vars) { $attributes = $variables['attributes']; $attributes['data-src'] = file_create_url($variables['path']); // <-- change here foreach (array('width', 'height', 'alt', 'title') $key)

symfony - Sonata User Admin - Custom field dependency -

i have extended sonataadmin class fosuser , added 2 custom fields (choice type external data source): company , sector i'd make sector dependent on company , if user selects company filters available sectors. i though using formevents filtering @ page load, don't know how company value of current form. here part of custom sectortype public function buildform(formbuilderinterface $builder, array $options) { $builder->addeventlistener(formevents::pre_set_data , function(formevent $event) { $data = $event->getdata(); $form = $event->getform(); // need company value here if set }); } public function setdefaultoptions(optionsresolverinterface $resolver) { $resolver->setdefaults(array( 'choices' => $this->getsectors(), )); } public function getsectors() { $sects = array(); // need pass selected company value getlist // (which gets list of sector can imagine) if (($tmp_sects

vsix - How can you tell if a Visual Studio command was triggered by keyboard or menu? -

is possible know if visual studio command triggered keyboard or menu? i'd write plugin monitored vs commands , suggested keyboard shortcuts commands chosen menu. it not possible determine command itself, how triggered. neither can information commandevent. design, because commands can bound arbitrary number of triggers of kind (including explicit invocation in code). what can do, however, register listener on commandbarbutton.onclick , commandbarcombobox.onchange in tree dte.commandbars.controls. whenever 1 of above events occurs, capture next commandevent. command triggered respective commandbarcontrol. i guess sufficient scenario describe. note, however, cannot conclude other commands triggered shortcut, since commands can triggered implicitly (through other commands). can approximate checking whether or not key pressed, when command occurs, rather fragile approach... if knows better approach here, adds welcome!

mysql - inner join with php the browser display a syntax error -

this question has answer here: syntax error in mysql php using inner join [closed] 3 answers i have select query inner join. try in phpmyadmin works fine. when try in browser display error message: you have error in sql syntax; check manual corresponds mysql server version right syntax use near 'select s.specialization_name user u inner jo' @ line 1 member_search.php /default message on top of result display $querysrting="where registered_date!='' order registered_date asc "; $querymsg="showing newest oldest memebrs default"; ///if statment distingouich searching if(isset($_post['listbyq'])) { if($_post['listbyq']=="newest_members") { $querysrting="where registered_date!='' order registered_date desc " or die(mysql_error()); $querymsg="showing senior

sql server - Setting up a test environment for SSIS 2008 -

i looking learn sql server integration services 2008 using sql server 2008 getting hands on , messing around it. i'd rather @ home on local install rather network, testing , learning. install business intelligence development studio (bids) well. what software need install achieve this? also, order (steps) taken setup such environment? the prerequisites sql server 2008 listed on microsoft website. do note sql server 2008 different product sql server 2008 r2. calling r2 stupid, stupid, confusing, , stupid marketing mistake imao. there number of implications between using 1 versus other typically bites people in backside when try restore 2008r2 backup 2008 instance. i suggest buying developer edition it's around $50 if hardship you, enterprise edition has 180 day trial period. depending on home hardware, might idea create virtual machine testing. advantage if not of testing done before 180 period expires, roll vm checkpoint took prior installing software.

asp.net mvc - Why CustomRoleManager Initializer not run in Web API? -

i created custom membership , custom role provider follow exact same link: for custom membership: http://msdn.microsoft.com/en-us/library/6tc47t75(v=vs.100).aspx more info: http://msdn.microsoft.com/en-us/library/ms366730(v=vs.100).aspx for custom role provider: http://msdn.microsoft.com/en-us/library/317sza4k(v=vs.100).aspx more info: http://msdn.microsoft.com/en-us/library/tksy7hd7(v=vs.100).aspx and have simplemembershipinitializer using system; using system.data.entity; using system.data.entity.infrastructure; using system.threading; using webmatrix.webdata; using testproject.web.models; using system.web.http.controllers; using system.web.http.filters; namespace testproject.web.filters { [attributeusage(attributetargets.class | attributetargets.method, allowmultiple = false, inherited = true)] public sealed class initializesimplemembershipattribute : actionfilterattribute { private static simplemembershipinitializer _initializer;

php - Detect Live Server Side changes (Long Polling, Short Polling or Web Sockets) -

justification , research i have site requires users login in order view. whilst users logged in, keep eye on user session. this, mean know whether or not user session has expired, , therefore redirect them. each user's session lasts 1 hour (or whatever set to), , reset if visit different page (like login systems). at present, have following algorithm: user arrives @ private page (javascript method called isuserauthorized() executed) the isuserauthorized() javascript method makes ajax request page 'ajax.example.net/authorized' this page returns json object indicating current status of user so: { authorized: true, timeout: 3600000 } the javascript method sets timeout call method again in timeout milliseconds, assuming session have ended then. if session has ended redirect user, otherwise recall in method in timeout milliseconds. there 2 reasons not current method: i have had issues time syncing between client , server clocks, weird causes issue

ios - Show MapView Annotations for Selected Radius -

i have map view several annotations on it. have settings button on navigation bar takes user picker view lets them show annotations or select radius of 5, 10, 25, 50, or 100 miles current location see annotations selected radius. i'm not sure how go having map show annotations selected radius. can @ least point me in right direction? here map: #import "rsfm.h" #import "annotationdetailview.h" #import "mapsettings.h" @interface rsfm () @end @implementation rsfm { } @synthesize centercoordinate, coordinate, title, subtitle, marketannotation, location; - (id)initwithnibname:(nsstring *)nibnameornil bundle:(nsbundle *)nibbundleornil { self = [super initwithnibname:nibnameornil bundle:nibbundleornil]; if (self) { self.title = nslocalizedstring(@"farm markets", @"farm markets"); // create location manager object locationmanager = [[cllocationmanager alloc]init]; [locationmanag