Posts

Showing posts from August, 2012

rest - Fetch Past Tweets within Particular Time Period -- Twitter Streaming API -

i working on little app give option user select , dates , app return tweets had in particular time span. twitter offering user stream api returns 200 records per request. account has 6790 tweets , need calculate favorite , retweets. 6790 result approx 33 requests if go tweets , how time take? further, cause issue due twitter rate-limit? if can please guide me on how can fetch data? thanks you don't need stream this. if want user's favourites, use favorites/list for example, favourites, call https://api.twitter.com/1.1/favorites/list.json?screen_name=edent&count=200 if user has authenticated you, it's easy retweets statuses/retweets_of_me

c# - Dropdown list call back not responding -

i new in asp.net developing have webpage contains 2 dropdownlist first 1 contains static items second dropdownlist have dynamic value read database when enabled callback = true first dropdownlist , write following code protected sub zr_dl_select_user_selectedindexchanged(byval sender object, byval e eventargs) handles zr_dl_select_user.selectedindexchanged zr_btn_add.text = zr_dl_select_user.selecteditem.value zr_tb_fullname.text = now().tostring dim db new mssqldb dim select_sql_stm string = "select top 1 h_id hotels u_id = @x_uid" if(db.reader.read) zr_dl_group.items.findbyvalue(db.readr("h_id")).selected = true end if end sub my page not respond changes , freez out make autopostback property of dropdown(zr_dl_select_user) true in .aspx page , check.

windows - Roaming profiles sync exception -

we're having server2012 roaming profiles , works fine. want make exceptions in folder synchronization. possible not sync ex. "downloads" folder? or have use folder redirection? want know best practices doing that. thanks gpo -> user configuration | administrative templates | system | user profiles | exclude directories in roaming profile

java - Develop attractive gui in linux -

i'm newbie in world of linux development. have used linux os in past (ubuntu, sabayon , gentoo little time). i'm .net c# developer , have done android app. my company, new project, ask me develop linux application in java attractive gui. i' ve searched around on net , have found old topics this. have read swing but.. swing has born in 1996 , little old tecnology. i have read vaadin web app , cannot permit use utility, read folders ecc. someone can suggest me can use? , editor use design of gui? thank answers , excuse me bad english. if want content rich (ui wise) applications, should take @ javafx since should offer better functionality older swing counter part. as far ide's, have used netbeans on linux distributions have owned (including sabayon) , should provide gui interface builder (much designer in visual studio). can take @ this netbeans page more directions on how use netbeans build ui application.

oracle - Association of foreign key to a table in different schema -

can please tell me how can create links , association 2 tables in different schemas in adf application, using jdeveloper 12c . thanks in advance . to access tables of different schema (user) need grant select schema. have no idea how jdeveloper ide (never used it), perhaps try doing using sqldeveloper , see how jdeveloper reacts..: so log in schema has user table , then grant select on table yourusertable theotherschema perhaps after can see table in jdeveloper , can create fk reference on table usual.

Translating matlab to c++ -

i`m trying translate matlab code c++ row row without bigger matlab knowledge. went till one: a = [1; a(:,n)]; i understand matrix generation first row/first column element being 1, im not quite sure next part should do. please give me hint? "a" twodimensional double matrix, "n" loop counter understand. regards midin a(:,n) means: elements ( : ) column n so a = [1; elements column n in a ] a = [1; a_n1; a_n2; a_n3 ...]

osx - Determine "-mmacosx-version-min" for static libraries (*.a) on OS X? -

is there way determine minimum version of os x static library work with? for executable files, "lc_version_min_macosx" load command can inspected using otool -l /path/to/binary | grep version information not present in static archives (".a" files). presumably because not mach-o binaries...

php - Generating dynamic dropdown list in Yii? -

Image
i need generate second dropdownlist based on choice of first. view in _form.php: <?php echo chtml::dropdownlist('category_id','', category::allcategory(), array( 'ajax' => array( 'type'=>'post', //request type 'url'=>ccontroller::createurl('subcategory/dynamicsubcategories'), //url call. //style: ccontroller::createurl('currentcontroller/methodtocall') 'update'=>'#subcategory_id', //selector update //'data'=>'js:javascript statement' //leave out data key pass form values through ))); //empty since filled other dropdown echo chtml::dropdownlist('subcategory_id','', array()); ?> also created controler: subcategorycontroller.php public function actiondynamicsubcategories() { $data = subcategory::model()->findall('category_id=:category_id', array(':cat...

android - Shared preferences on fragment -

i trying use shared preferences on android inside fragment appcompat. says me "the method getdefaultsharedpreferences(context) in type preferencemanager not applicable arguments (preferenciasfragment)" here code: private void savepreferences(string key, string value) { sharedpreferences sharedpreferences = preferencemanager.getdefaultsharedpreferences(this); editor editor = sharedpreferences.edit(); editor.putstring(key, value); editor.commit(); } try this.. use getactivity() instead of this sharedpreferences sharedpreferences = preferencemanager.getdefaultsharedpreferences(getactivity());

sql server 2012 - Dynamic Operator In SQL -

i have problem. declare @sql nvarchar(max) declare @max int set @max=10 declare @min int set @min=0 declare @oper nvarchar(40) set @oper='>' declare @value int set @value=0 declare @r_sql int set @sql='select @r_sql = case when'+cast(@value int)+cast(@oper nvarchar(1))+@min+' 1 else 0 end ' exec sp_executesql @sql, @value, @min, @max, @r_sql output select @r_sql i want pass dynamic operator execute query says 'error converting data type varchar numeric.' got problem? please me. thanks, appreciate. the + operator in t-sql can bit wonky. if want concatenate strings, make sure input strings: set @sql=n'select @r_sql = case when' +cast(@value nvarchar(max)) +@oper --already nvarchar, , length thing done automatically +cast(@min nvarchar(max)) +n' 1 else 0 end ' basically, sql server does, when sees + , it's first instinct add 2 numbers. if things on both sides...

How to read specific field value from xml using linq in C# -

here xml iam trying read. in below given xml want read "customfieldvalue" customfieldname = "fixed in build". - <customfield id="customfield_10021" key="x"> <customfieldname>date of first response</customfieldname> - <customfieldvalues> <customfieldvalue>thu, 27 mar 2014 00:28:36 -0700</customfieldvalue> </customfieldvalues> </customfield> - <customfield id="customfield_10034" key="x"> <customfieldname>fixed in build</customfieldname> - <customfieldvalues> - <customfieldvalue> <a href="url" title="[m8960aaaaanlgd2322586.1] - apps crash - internal error: (fsr = 0x5) (pc = msm_rpmrs_lowest_limits+0x8c/0x240)">144148</a> </customfieldvalue> </customfieldvalues> </cus...

html - How to keep the state of a css based navigation menu while navigating to other pages -

i new css , trying find out how keep state of css based menu on multiple pages. the situation working on intranet site. there set structure of website. have content files , left menu file. left menu file used creating links other pages , imported in content files. (these asp files , not sure call technically using content of 1 file in other files). so task have site map , want translate links in left menu file appear in content pages. i using this example , adjusted needs. problem when go 1 page other state of expanded , collapsed nodes not stay same. best way achieve this.

javascript - Destroying an AngularJS $interval which is started in an ngDialog modal -

i have modal showing data table. underlying data updated every few seconds using $http , $interval, when modal showing. using ngdialog library modals. need update stop on modal close, don't know best way trigger destruction. code: $scope.openmodal = function() { var refreshmodal = function() { $http({ params: {proj_id: $scope.projectid}, url: '/projects/_get_data', method: 'get' }) .success(function(data, status, headers) { $scope.modaldata = data.data; $scope.updatemodal() }) .error(function(data, status, headers) { console.log('it didnt work'); }); } refreshmodal(); $interval( function() { refreshmodal(); }, refreshrate); ngdialog.open({ template: 'modalid', scope: $scope, classname: 'table-modal', showclose: false }); }; how can detect modal closing? thanks. the best thing pass instance of $interval modal close event, , upon closing modal, kill...

android - ViewPager for matrix data -

Image
i want use view flipper works on matrix , not list allowes me either flip vertical or horizontal - both @ same time. know there similar on lists working implementations directionalviewpager work on list , user has configure if want flip horizontal or vertical exclusivly. have situation in image in mind: the blue area current visible element. grey boxes fragments user can navigate , from.

java - returning a value within a abstract method -

i have abstract class called temperature following public abstract class temperature { private float value; public temperature(float v) { value = v; } public final float getvalue() { return value; } public abstract temperature tocelsius(); public abstract temperature tofahrenheit(); } then have celcius , fahrenheit class extend temperature, space sake ill show celcius public class celsius extends temperature { public celsius(float t) { super(t); } public string tostring() { // todo: complete method return ""; } @override public temperature tocelsius() { // todo auto-generated method stub return null; } @override public temperature tofahrenheit() { // todo auto-generated method stub return null; } } so main program creates new celcius object follows temperature inputtemp = null , outputtemp = null; inputtemp = new celsius(temp_val); outputtemp assigned input...

c# - Index was outside the bounds of the array (System.Byte to tinyint) -

i'm stuck have sp (dbo.getbalance) returns multiple recordsets. 2 recoredsets and 1 of sp's parameters tinyint ( lang_type ), know in c# system.byte, when i'm trying pass parameter error: "index outside bounds of array" here code public class balance : dataclasses1datacontext { [function(name = "dbo.getbalance")] [resulttype(typeof(balanceuserlist))] [resulttype(typeof(userbalanceaccount))] public imultipleresults getuserbalance(int iclient_no, int session_id, datetime? bal_date) { system.byte lang_type = 0;// helper.getlanguage(); iexecuteresult result = this.executemethodcall(this, ((methodinfo)(methodinfo.getcurrentmethod())), iclient_no, session_id, bal_date, lang_type ); return (imultipleresults)(result.returnvalue); } } and sp's parameters @iclient_no int, @session_id int, @bal_date ...

entity framework - Using enum as FK on EF 6 -

i'd use enum foreign key in code-first app. since enums stored int, thought use attribute [foreignkey] on enum property, throws exception: the types of properties in dependent role of referential constraint must same corresponding property types in principal role here example of trying do: public enum usertype { administrator = 1, member = 2 } public class user { public int userid { get; set; } public string login { get; set; } [foreignkey("typedetails")] public usertype type { get; set;} public virtual mastertype typedetails { get; set; } } public class mastertype { public int mastertypeid { get; set; } public string description { get; set; } ... } is possible or similar through fluent api or migrations? thanks here's 1 made earlier: https://www.nuget.org/packages/ef-enum-to-lookup it's nuget package provides method can call in seed (initializer and/or migrations) automatically build lookup ta...

php - Select by two values (AND), and if nothing will be found select by each (OR) -

i have mysql query: $sql = "select * cities "; if ($city) { $where .= ($where ? " , " : "")." ( city = '$city' ) "; } if ($street) { $where .= ($where ? " , " : "")."( street = '$street'"); } if ($where) { $sql .= $where; $query = mysql_query($sql) or die(mysql_error($dbconnect_finder)); } i build query, if nothing found, use or operator instead of and. know can query again, if there no resoults. reduce costs, in 1 query. edit: when user search $city , $street, , use $city = "londan" (insteed of london), $street = "somestreet". , operator not work. or operator should work. possible in 1 mysql query? you can try like $sql = "select * cities city = '$city' or street = '$street'"; or can try $sql = "select * cities city = '$city'"; $result = mysql_query($sql); if(count($result) == 0) { $sql .= ...

iMacros: EVENT:FAIL_IF_FOUND on !URLCURRENT -

is possible make event:fail_if_found work on {{!urlcurrent}} ? e.g, if visit site, , submit something, when things goes wrong, redirected error page, example sample.com/submit?sorry-information-already-in-the-database-239929.html so, want generate error -990 if "sorry" found in current url. this don't' work: tag {{!urlcurrent}} attr=href:sorry content=event:fail_if_found you can use eval emit exception: set !var1 eval("/sorry/.test('{{!urlcurrent}}') && macroerror('wrong page')")

AngularJS directive with a Swiffy instance throws error on route navigation -

setup i have directive takes path json file attribute value, loads json, instantiates swiffy: angular.module('myapp') .directive('swiffy', function ($http) { return { restrict: 'a', scope: {}, link: function postlink($scope, $element, attrs) { var stage; // listen angular destroy $scope.$on('$destroy', function() { if(stage) { stage.destroy(); stage = null; } }); // load swiffy json $http({ method: 'get', url: attrs.swiffy }).success(function(data, status, headers, config) { stage = new swiffy.stage( $element[0], data ); stage.start(); }).error(function(data, status, headers, config) { }); } }; }); the markup: <div swiffy="my-animation.json"></div> i have basic routing setup: angular .module('myapp', [...

meteor - Add meteorite package error -

i have problem installing packages in meteor. have used sudo installation meteorite , still "problem when cloning repo" error. have reinstalled/unistalled both meteor , meteorite several times. this error in terminal: error: null command failed: stdout: stderr: /usr/local/lib/node_modules/meteorite/lib/sources/git.js:124 throw "there problem cloning repo: " + self.url + ^ there problem cloning repo: https://github.com/benjaminrh/meteor-event-hooks.git please check https://github.com/oortcloud/meteorite/blob/master/contributing.md#troubleshooting potential explanations. i've tried follow suggestions other posts without luck. suggestions appreciated, thank you.

java - Struts validation error: "Got result of null when trying to get Boolean" -

i have action class , validation in xml. validation successful except one: <field name="dealboardrequestdto.contracttype"> <field-validator type="fieldexpression"> <param name="expression"> <![cdata[((dealboardrequestdto.contracttype!=null) , (dealboardrequestdto.contracttype.size()>0) , (!dealboardrequestdto.contracttype.contains(0)) )]]> </param> <message key="invalid.fieldvalue.dealboardrequestdto.contracttype" /> </field-validator> </field> got following error in console: fieldexpressi w com.opensymphony.xwork2.util.logging.commons.commonslogger warn got result of null when trying boolean. in dealboardrequestdto class there list<integer> of contracttype getters , setters. if not use validation above code ok , contracttype updated. in action class there map...

android - What are the advantages and disadvantages of having mark bits together and separate for Garbage Collection -

i watching video google io 2008 - dalvik virtual machine internals understand how dalvik vm works , why people has preferred dalvik vm on jvm android. found android uses separate memory garbage information objects , opposed jvm have mark bits(bits telling whether object able garbagfe collection or not) objects. can tell me in detail advantages , disadvantages of having separate memory marks bits , not having separate memory mark bits ? i unable difference watching video. some advantages of separate bitmap: much denser. typical gc needs maybe 8 bits of gc metadata, due alignment in-object header might round memory 32 bits. some operations, in particular around sweeping, become faster. partly because denser (see above) bitmap means less memory traffic , better cache use, because operations (e.g. zeroing mark bits) can vectorized when in format. (other parts of gc needs designed make use of ability.) if fork() on unix system, separate bitmark makes better use o...

cocos2d-android jar file not supporting xxhdpi screen -

i'm new in game development. i'm working on android game app have used cocos2d-android.jar file achieve cocos2d functionality. app running fine on screen resolutions except xxhdpi screen size. when run app on xxdpi screen sized devices shows black screen. please me find out correct cocos2d jar file version run on same code have implemented , provide support resolution. highly appreciated. up code: view = new ccglsurfaceview(this); setcontentview(view); ccdirector director = ccdirector.shareddirector(); director.attachinview(view); if(director.winsize().height > 1735){ director.setscreensize(director.winsize().width, 1735); framelayout.layoutparams params = (framelayout.layoutparams) view.getlayoutparams(); params.height = 1735; params.gravity = gravity.center; view.setlayoutparams(params); } 1735px cocos2d-android1 can display max height.~~ see this: has run game on higher resolution in cocos...

c# - What is the basic difference between System.Collections.Generic.List and System.Linq.IQueryable -

this question has answer here: differences between iqueryable, list, ienumerator? 3 answers what basic difference between system.linq.iqueryable , system.collections.generic.list 1 faster , when use what? an iqueryable<t> interface abstracts type of query. query can executed (by iterating on query), have use tolist<t> convert (the results of) query list. a list<t> list can contain objects. ready retrieved when need them.

ios - Create image on top of another uiimage -

i not able draw image on top of image. below if code using: -(void)createimage { // create new bitmap image context @ device resolution (retina/non-retina) uigraphicsbeginimagecontextwithoptions(imgvw_nohair_.frame.size, yes, 0.0); // context cgcontextref context = uigraphicsgetcurrentcontext(); // push context make current // (need manually because not drawing in uiview) uigraphicspushcontext(context); // drawing code comes here- @ cgcontext reference // available operations // example draws inputimage context [eraser drawatpoint:cgpointmake(50, 50)]; // pop context uigraphicspopcontext(); uiimage _image_ = uigraphicsgetimagefromcurrentimagecontext(); uigraphicsendimagecontext(); } the image current context black image. want draw eraser image on image context. this updated code working in side. -(void)createimage { //create context in have draw uigraphicsbeginimagecontextwithoptions(imgvwimage.image.size, yes, 0.0); // context cgcontextref ...

php - Adding jQuery to Wordpress archive search -

for of pages on wordpress site need .wrap {max-width: 100%;} reason affects archive search page differently , makes results span whole page. in short if know add jquery, can code myself having difficulty finding put code. by archive results page mean, when on wordpress blog , default archive widget dropdown menu clicked, choose month , forwarded onto page month. page displays results, , on page need bring wrap max-width in. i know it's more efficient php not comfortable php yet prefer put simple jquery .css function in there. you can without jquery. add in header.php file before wp_head() function. <?php if(is_archive()){ ?> <style type="text/css"> .wrap { max-width: 70% !important; //change whatever want. } </style> <?php } ?>

c++ - Subclass object as a parameter to a virtual function -

ok, have class in use in class which, among other things, asks on object report on relationship object of same type. works great. fyi class represents protocol. unfortunately, i'm trying decorate class relationship adding class called wrapper. main power of class can take first class argument (or else same).: template< class innerinterpreter > class wrapperinterpreter { public: wrapperinterpreter(const innerinterpreter &m) : innermessage(m) {} ... virtual bool respondstomessage(const wrapperinterpreter<innerinterpreter> &) const = 0; public: //member innerinterpreter innermessage; }; what i've concluded other design reasons having base class set of wrappers (rather taking 2 different protocols arguments) allows me combinatorial set of outer , inner protocol classes. so here's problem: when try subclass wrapperinterpreter<> , , in particular provide implementation respondstomessage() , end subclass able compare clas...

c# - want the disptacher to call a method right after eventhandler finished -

i have wpf usercontrol handles events combobox. control subscribes comboboxes' dropdownclosed event. i'm facing problem, combobx base implementation peforms unpleasant default code, after running through handler. i know if there's way place code, "synchronous" after handler finished. i found out common way using begininvoke: void oncomboboxdropdownclosed() { ... dispatcher.begininvoke(dispatcherpriority.normal, new action(() => mycodeafterhandlerfinished())); } i don't think need (because msdn tells me runs asynchronously), best practice ? more explained: 1) notified when dropdownclosed() fired combobox base (this event can seen condition "mycode()") 2) wait until combobox base implementation has run through invocation list , has dispatched event subscribers. 3) run mycode() --> how place mycode using invoke / begininvoke ?

angularjs - ng-options taking value from 0,1,2...., instead of using Id given in option -

i have data this localitems = [{id: 234565, name: "my class"}, {id: 871243, name: "class 321"}]; i using in template, ng-options="item.id item.name item in localitems"//used work my angularjs version 1.2.15 what want: <option value="234565">my class</option> <option value="871243">class 321</option> what getting: <option value="0">my class</option> <option value="1">class 321</option> it worked every time, don't understand why not working is because id value's large? if want have property value assigned right id use track by : ng-options="item.id item.name item in localitems track item.id" but ng-model assigned right value anyway working jsfiddle : http://jsfiddle.net/kn9xx/20/

How to use a customized directory location for installing R packages -

i running rstudio 0.97 r 3.0.1 on windows 8.1. installed lot of packages through rstudio , went "\r\r-3.0.1\library". installed r 3.1.0 , set rstudio use new version of r. found packages inaccessible rstudio. how make packages in shared folder different versions of r on pc can use them? i tried use .libpaths("xxxx package sharefolder") set sharefolder storing , installing new packages, works in session when restart rstudio, path reset. didn't work. first, mkdir ~/whatever-you-want if necessary. second, add r_libs_user="~/whatever-you-want" '~/.renviron' . so, if want reuse \r\r-3.0.1\library mentioned, add r_libs_user="\r\r-3.0.1\library" '~/.renviron' . if using windows, put .renviron in c:\users\<user-name>\ . hope helps.

function - Passing an element of an array of structs in C -

i trying pass 1 of 20 "database" structs made here prototype function "add" void add(struct database test); i want pass database struct , i'll call "test" here database structure struct database { char id[6]; char duration[3]; }; main() { char menu; struct database employee[20]; // make 20 employee variables int = 0; /*a counter use edit structs ie a=2 "employee[a]" = "employee[2]" */ i call function this: add(employee[a]); a++; /*once exits want go next employee variable increment counter */ the actual function looks this: void add(struct database test) { static int = 0; printf("\nplease enter 5 digit employee number: "); scanf("%s", test[a].id); a++ } while doing error: error e2094 assignment.c 64: 'operator+' not implemented in type 'database' arguments of type 'int...

asp.net mvc - How to detect postback in javascript? -

i need fill text current datetime on first page load using javascript. mean i'm looking analog page.ispostback property in asp.net, in js. i've found solutions, adviced use server-side code detect postback , pass variable client-side. i'm using mvc, , there no property such page.ispostback... please, me find answer there's no such think on mvc. you've actions can handle posts, gets or both. can filter each action can handle using [httppost] , [httpget] attributes. on mvc, closest can ispostback within action: public actionresult index() { if (request.httpmethod == "post") { // } return view(); } therefore, [httppost] public actionresult create(createmodel model) { if (request.httpmethod == "post") // <-- true { // } return redirecttoaction("index"); } ref: mvc3 page - ispostback functionality

use while loop in matlab -

let consider following code clear all; b=xlsread('data_generations1','a1','g8:g301'); % n=input('enter number 1 16 windows in periodogram :'); fs=input('enter sampling frequency fs :'); while 1 n=input('enter number 1 16 windows in periodogram :'); switch n case 1 disp('this hann window '); [pxx,f]=periodogram(b,hann(length(b)),length(b),fs); subplot(4,4,1); plot(f,pxx); hold on case 2 disp('this hamming window '); [pxx,f]=periodogram(b,hamming(length(b)),length(b),fs); subplot(4,4,2); plot(f,pxx); hold on case 3 disp('this kaiser window '); [pxx,f]=periodogram(b,kaiser(length(b),2.5),length(b),fs); subplot(4,4,3); plot(f,pxx); hold on case 4 disp('this barlett window '); [pxx,f]=periodogram(b,bartlett(length(b)),l...

json - Create dojox datagrid structure layout programmatically/dynamically -

Image
i want create dojo datagrid header looking : as can see want section headers (section a, section b...), containing many "subheaders" (a1, a2, a3... b1, b2...). data in json response when call page. able 2 things : first, data in json display subheaders, : var gridstructure = [ {width:'150px', name:'table'} ]; for(var = 0 ; < response.columns.length ; i++) { for(var j = 0 ; j < response.columns[i].sections.length ; j++) { var subcolumntoadd = {width:'200px', name:response.columns[i].sections[j].sectionname}; gridstructure.push(subcolumntoadd); } } grid.setstructure(gridstructure); and able display table how want, not dynamically : var gridstructure = [{ cells:[ [{width: 'auto'}], [{ name: 'section a', colspan: 2 }], [{ name: 'a1', field: 'col1' ...

html - Displaying the results of a Javascript function -

i'm trying javascript function print out, nothing comes up. i'm setting basic page of text boxes, radio buttons , checkboxes users fill out , results of elements print out create basic barebones profile page. i apologize in advance sloppy or obsolete coding, i'm starting out stuff (my first semester of classes in web design). i'm assuming i've made minor error i'm not catching that's screwing rest of code, or i'm plain missing key line of code. here's code below (javascript): ` function validate() { dataout = document.getelementbyid("profileout"); var color = document.profilein.bgcolor.value; style.backgroundcolor = color; var border = document.profilein.border.value; style.border = border; var name = document.profilein.name.value; dataout.innerhtml = "<h1 id='name'>" name "</p>"; if (document.getelementbyid('sportsgames').checked { dataou...

reporting services - Getting the error "Data retrieval failed for the subreport, 'Subreport1'" while trying to preview a report from Business Intelligence Studio -

i know question has been asked before, questions reports being accessed using c# or vb.net code. problem building , accessing report using business intelligence studio, trying add sub report report, , made sure parameters , ok. when try access report containing subreport, error "data retrieval failed subreport, 'subreport1'". i tried deleting .data files same problem persisted. i faced similar issue in past , in case below culprit's 1] parameter main report sending null value sub report. 2] data type of parameter different actual data type. please check if doing same.

android - Unable to start a sub activity using intent -

i trying start sub activity main activity using intents using android sdk version 4. doing so, results in error during runtime. screen error received emulator - "unfortunately myfirstapp has stopped" logcat error - "could not find class 'com.example.firstapp.displaymessageactivity', referenced method com.example.firstapp.mainactivity.sendmessage" here "com.example.firstapp.displaymessageactivity" sub activity called main activity "com.example.firstapp.mainactivity" same file content: com.example.firstapp.mainactivity public class mainactivity extends activity { public final static string extra_message = "com.example.myfirstapp.message"; @override protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.activity_main); if (savedinstancestate == null) { getfragmentmanager().begintransaction() ...

ios - UICollectionView: Adding item at a specified Index and scroll to this item -

i have created vertical scrolling custom layout uicollectionview . items added collection through classic pull add , shown in alphabetical order. if add item starts z letter placed @ end of collection want collection scroll automatically show last cell. currently i'm using code: [self.collectionview performbatchupdates:^{ // update datasource [self updatetasks]; // insert new item collection [self.collectionview insertitemsatindexpaths:@[[nsindexpath indexpathforitem:[self.tasks indexofobject:task] insection:0]]]; } completion:^(bool finished) { // reload data , scroll [self.collectionview reloaddata]; [self.collectionview scrolltoitematindexpath:@[[nsindexpath indexpathforitem:[self.tasks indexofobject:task] insection:0] atscrollposition:uicollectionviewscrollpositiontop animated:yes]; }]; it works... can see use performbatchupdates add item. uicollectionview au...

asp.net - SimpleMembership with IBM Informix in MVC4.0 -

i stuck simplemembership ibm informix in mvc4.0 database. i facing issue @ moment when "websecurity.initializedatabaseconnection("opiocentraldb", "userprofile", "userid", "username", autocreatetables: true);" method calling. exception occurred saying "error [42000] [ibm][ids/unix64] specified table (informix.tables) not in database. (-111 isam error: no record found.)" as per research runtime looking table required perform simplmembership , trying create & due syntax problem failing so. i created required table in db already, getting same error! please me. thanks in advance. i have googled many days , came conclusion reading many posts seems not possible because there syntax difference between ms sql expressions , informix sql expression projecting queries. the moment simplemembership tries create tables or check existing tables needed performing membership; due syntax differences fails create ,...

java - how to check if my app is on the foreground? -

this question has answer here: check android application in foreground or not? 11 answers i'm running android app. i want enable push notifications when app not visible (closed or in background). i have seen code: activitymanager activitymanager = (activitymanager) this.getsystemservice( activity_service ); list<runningappprocessinfo> procinfos = actvitymanager.getrunningappprocesses(); for(int = 0; < procinfos.size(); i++){ if(procinfos.get(i).processname.equals("com.android.browser")) { toast.maketext(getapplicationcontext(), "browser running", toast.length_long).show(); } } for checking if browser on, but it's not enough me check if process on, it can running not visible @ moment, and want notifications show in case oppose when it's visible. the approach fol...

javascript - Combination of n numbers into two unique groups -

i have implement combination game players randomly selected 2 group n players in javascript. for example: if there 4 players - b c d ab vs cd - first round team ac vs bd - second round team ad vs bc - third round team if there 6 players - b c d e f abc vs def ade vs bcf each time player playing unique player in such way no 2 players can play game same players 3 times in row. there way generate such kind of combination. thank answer. its easy archiv can make function pass in 4 or 6 names argument or better array random mix array the de-facto unbiased shuffle algorithm fisher-yates (aka knuth) shuffle. see https://github.com/coolaj86/knuth-shuffle you can see great visualization here (and original post linked this ) function shuffle(array) { var currentindex = array.length , temporaryvalue , randomindex ; // while there remain elements shuffle... while (0 !== currentindex) { // pick remaining element... randomindex = math.fl...

ruby - Why does "gem install passenger" fail with "undefined method `join' for nil:NilClass"? -

using rvm v1.25.22, when try install passenger gem, fails. installing other gems, such pry , succeeds. [nick@app02 ~] gem install passenger head http://rubygems.org/latest_specs.4.8.gz 302 moved temporarily … installing gem passenger-4.0.41 /usr/local/rvm/gems/ruby-1.9.3-p448/gems/passenger-4.0.41/.gitignore /usr/local/rvm/gems/ruby-1.9.3-p448/gems/passenger-4.0.41/.travis.yml ... /usr/local/rvm/gems/ruby-1.9.3-p448/gems/passenger-4.0.41/test/tut/tut_reporter.h /usr/local/rvm/gems/ruby-1.9.3-p448/gems/passenger-4.0.41/test/valgrind-osx.supp building native extensions. take while... /usr/local/rvm/rubies/ruby-1.9.3-p448/bin/ruby extconf.rb attempting download https://oss-binaries.phusionpassenger.com/binaries/passenger/by_release/4.0.41/rubyext-ruby-1.9.3-x86_64-linux.tar.gz /usr/local/rvm/gems/ruby-1.9.3-p448/gems/passenger-4.0.41/download_cache attempting download https://oss-binaries.phusionpassenger.com/binaries/passenger/by_release/4.0.41/webhelper-1.4.7-x86_64-linux.tar.gz...

regex - How do I check if a string has exactly one of a certain character -

i'm trying scan strings see if have 1 of character. for example if i'm looking question mark hello? i'm here will match regex however hello? listening? will not i've tried ?{1} , ?{1}[^?]+ both don't work. can point me in right direction? why not do: (\?) and count number of matches. or more simply, count number of ? in string using tr/// my $c = $string1 =~ tr/?//;

fiddler - Capture HTTPS request to nonexistent server with FiddlerCore -

i try response https request, using fiddlercore. need things work that: put fake url in browser, https://my_url_that_doesnt_exist.com/ intercept request fiddlercore , respons data. see connect , host url. know, due https , fiddler proxy. there way real url , able respond https request, using fiddler core? also use code create root certificate if missing: if (!fiddler.certmaker.rootcertexists()) { if (!fiddler.certmaker.createrootcert()) { throw new exception("could not create certificate."); } } also use startup settings: fiddlercorestartupflags fcsf = fiddlercorestartupflags.default | fiddlercorestartupflags.decryptssl|fiddlercorestartupflags.allowremoteclients; and config.ignoreservercerterrors = true; this https request not visible in fiddler itself. mean if try non-existing url id app respond custom content. http, not https , fiddler contain following in response:...

ios - Why i can't get contents of adressbook -

i trying content of adressbook these codes. abaddressbookref addressbook = abaddressbookcreate(); if (addressbook != nil) { nslog(@"succesful."); nsarray *allcontacts = (__bridge_transfer nsarray *)abaddressbookcopyarrayofallpeople(addressbook); nsuinteger = 0; nslog(@"countt=%lu",(unsigned long)[allcontacts count]); } i succesful log count "0", use simulator , added contacts in test. ios 7 , xcode 5. i glad take advice or help. the problem test nil meaningless. if have not been granted access user address book, result of abaddressbookcreate() still non-nil. useless! so, moral is: test see whether have been granted access ( abaddressbookgetauthorizationstatus ) and, if access has been neither granted nor denied, request formally ( abaddressbookrequestaccesswithcompletion ).

android - Type Conversion to Dalvik format failed: Unable to execute dex: java.nio.BufferOverflowException -

i making simple map application on running it, errors displayed don't understand.... my project min sdk android 2.2(froyo) api 8 , target sdk android 4.4(kitkat) api 19 , app compiled google api 2 rev 8..... i don't know should combinations of min, target , compiled apis in order make app run ....help me out proper combination. following manifest file code <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.example.margallahillhikedroid" android:versioncode="1" android:versionname="1.0" > <uses-sdk android:minsdkversion="8" android:targetsdkversion="19" /> <uses-permission android:name="android.permission.access_coarse_location"/> <uses-permission android:name="android.permission.access_fine_location"/> <uses-permission android:name="android.permis...

Windows Batch for Pipe out Variable -

how can value myvar attribute use in other part of code. set myvar = echo "httpsxxxxxx_cmidxxxxx_2014-04-12_14-54-53_abc3654.xml" | find /i "2014-04-12" | (set /p myvar= & set myvar) echo myvar "%myvar%" /**** empty string**********/ try : @echo off /f "delims=" %%a in ('echo "httpsxxxxxx_cmidxxxxx_2014-04-12_14-54-53_abc3654.xml" ^| find /i "2014-04-12"') set myvar=%%a echo %myvar% i don't anderstand trying do. but assuming you're looking .xml file contain string "2014-04-12" in directory. code : @echo off /f "delims=" %%a in ('dir /b/a-d *.xml ^| find /i "2014-04-12"') set myvar=%%a

How to open the device setting on home button click - android -

want open setting of device when click on home button in device tried code when app start open device setting automatically @override public void onattachedtowindow() { super.onattachedtowindow(); this.getwindow().settype(windowmanager.layoutparams.type_keyguard); startactivityforresult(new intent(android.provider.settings.action_settings), 0); } how make code open setting of device when home key button clicked ?

html - Jquery remove labels from contact form on focus -

i need contact form. i'm trying remove labels automatically when user clicks in box, can't seem figure out how. this html <div class="six columns"> <form> <div class="row"> <div class="six columns"> <label class="gfield_label" for="name" style="display: block;">name<span class="gfield_required">*</span> </label> <input type="text" id="name" required class="mobile-four" /> </div> <div class="six columns"> <label class="gfield_label" for="name" style="display: block;">company</label> <input type="text" id="name" required class="mobile-four" /> </div> </div> ...

ant - launch cocos2dx project with Android -

i'm using cocos2dx 3.0 rc1, , in installation typed : ./setup.py i entered ndk root, , sdk root, didn't put on ant root explained in tutorial : here . know when use : cocos run -s ~/mycompany/mygame -p android , says ant_root not defined. i've installed using macport, when type ant, says build missing. i want create game in android using cocos2dx. you go ahead , define ant_root in .bash_profile . export ant_root=<where ever is> export path=$ant_root:$path

c# - Is there a better way to search a list with another list -

is there better linq query see if list contains item in list following: results.where(r => r.categories.intersect(submittedcategories).count() > 0) where r.categories list of categories result in , submittedcategories list of categories user want filter on i use enumerable.any instead of enumerable.count : results.where(r => r.categories.intersect(submittedcategories).any()) method count() has optimization sources implement icollection (it returns count property value of collection). result of enumerable.intersect ienumerable<t> in case count() iterate on set: public static int count<tsource>(this ienumerable<tsource> source) { if (source == null) throw error.argumentnull("source"); icollection<tsource> is2 = source icollection<tsource>; if (is2 != null) return is2.count; icollection is3 = source icollection; if (is3 != null) return is3.count; ...

python - Function returning 'None' -

i'm working on problem using python. here's concerned code problem i'm explain: def no_to_words(n): num = str(n) s = "" if(len(num) == 3): hunds = n/100 ten = n%100 tens = ten/10 units = ten%10 if(n == 100): return "one hundred" if(hunds == 1): s = s + "one hundred and" elif(hunds == 2): s = s + "two hundred and" elif(hunds == 3): s = s + "three hundred and" elif(hunds == 4): s = s + "four hundred and" elif(hunds == 5): s = s + "five hundred and" elif(hunds == 6): s = s + "six hundred and" elif(hunds == 7): s = s + "seven hundred and" elif(hunds == 8): s = s + "eight hundred and" else: s = s + "nine h...

vba - Linking MS Visio document stencils to master stencils -

in ms visio , can create master stencil, , drag shapes stencil multiple drawings. however, once dragged drawing shape copied document stencil drawing. editing master stencil (from shape dragged in from) has no effect on shape in drawing. must edit shape in document stencil. this of course extremely inconvenient, can document stencil linked master stencil updating master have effect on every drawing derived it? makes sense wouldn't step through searching every drawing using shape stencil edited, seems reasonable able "link" drawing master stencil , drawing @ master stencil linked every time opened , apply changes it's own document stencil. so, question: type of functionality possible in visio? working standard version, perhaps professional version has feature similar this? if not, achievable through vba ? vba script run through folder, checking every drawing , making updates document stencil enormously helpful. don't know how immediatly tackle th...

java - Remove fragment crash -

i add , remove fragments : add getsherlockactivity().getsupportfragmentmanager() .begintransaction() .setcustomanimations(r.anim.slide_in_bottom, r.anim.slide_out_top, r.anim.slide_in_top, r.anim.slide_out_bottom) .add(r.id.fragment_explore, fragment) .addtobackstack(null) .commit(); activitymain.backstack_explore.add(fragment); remove fragment depopfragment = backstack_explore.get(backstack_explore.size() - 1); getsupportfragmentmanager().begintransaction() .setcustomanimations(r.anim.slide_in_top, r.anim.slide_out_bottom, r.anim.slide_in_bottom, r.anim.slide_out_top) .remove(depopfragment) .commit(); backstack_explore.remove(depopfra...

javascript - jQM 1.4 : event handler for buttons in listview -

i have listview containing styled items buttons : (working example : http://jsfiddle.net/tq88p/ ) <ul id="runningjoblist" data-role="listview" data-inset="true" class="ui-listview ui-listview-inset ui-corner-all ui-shadow"> <li data-role="list-divider" role="heading" class="ui-li-divider ui-bar-inherit ui-first-child">traitements en cours</li> <li class="styled-li ui-li-static ui-body-inherit ui-last-child" title="create buffer around input vector file"> <div class="processstatus"> <h6>buffer</h6> <p><strong>accepted: </strong>process foo accepted</p> </div> <div class="processbuttons"> <button id="holdprocess-f80a5070-c3e8-11e3-ae6a-005056af4240" data-inline="true" data-icon="lock" data-iconpos...