Posts

Showing posts from May, 2010

loops - fgets in C language multiple prints after get string -

i have code , want loop finish when user gives "###". int main(){ char s[10]; printf("give string: "); fgets(s,11,stdin); do{ printf("give string: "); fgets(s,11,stdin); }while ( s!="###" ); return 0; } so far it's ok, when user gives input bigger 11 characters have multiple prints of "give string". try scanf , did right. can give me solution fgets ? i mean output looks this. c string doesn't support direct comparison, need strcmp that, so while ( s!="###" ) should while(strcmp(s,"###")) also you'd need remove \n fgets (so strcmp ignore \n ). do..while should like: do{ printf("give string: "); fgets(s,11,stdin); s[strlen(s) - 1] = '\0'; } while (strcmp(s,"###"));

Python pandas dataframe: find max for each unique values of an another column -

Image
i have large dataframe (from 500k 1m rows) contains example these 3 numeric columns: id, a, b i want filter results in order obtain table 1 in image below, where, each unique value of column id, have maximum , minimum value of , b. how can do? edit: have updated image below in order more clear: when max or min column need data associated of others columns sample data (note posted image can't used potential answerers without retyping, i'm making simple example in place): df=pd.dataframe({ 'id':[1,1,1,1,2,2,2,2], 'a':range(8), 'b':range(8,0,-1) }) the key using idxmax , idxmin , futzing indexes can merge things in readable way. here's whole answer , may wish examine intermediate dataframes see how working. df_max = df.groupby('id').idxmax() df_max['type'] = 'max' df_min = df.groupby('id').idxmin() df_min['type'] = 'min' df2 = df_max.append(df_min).set_index(...

Any Ideas how to check that facebook user is a member of some group via API v 2.8 -

i know impossible list of user groups in facebook. have ideas how check it, if have list of members of group(id, name)? example, person tries auth through facebook application, , after authorization , can link "www.facebook.com/app_scoped_user_id/{value}/". can suggest me way compare app_scoped_link , real user profile url?

Is there a difference in C++ between copy initialization and direct initialization? -

suppose have function: void my_test() { a1 = a_factory_func(); a2(a_factory_func()); double b1 = 0.5; double b2(0.5); c1; c2 = a(); c3(a()); } in each grouping, these statements identical? or there (possibly optimizable) copy in of initializations? i have seen people both things. please cite text proof. add other cases please. a a1 = a_factory_func(); a2(a_factory_func()); depends on type a_factory_func() returns. assume returns a - it's doing same - except when copy constructor explicit, first 1 fail. read 8.6/14 double b1 = 0.5; double b2(0.5); this doing same because it's built-in type (this means not class type here). read 8.6/14 . a c1; c2 = a(); c3(a()); this not doing same. first default-initializes if a non-pod, , doesn't initialization pod (read 8.6/9 ). second copy initializes: value-initializes temporary , copies value c2 (read 5.2.3/2 , 8.6/14 ). of course require non-explicit copy constructor (rea...

c++ - Returning to the menu & exiting the program -

(c++) i'm writing program assignment , requires program prompt user return menu or quit program after each case, problem i'm not sure how implement efficiently. ideas? quitting, call last function called 'exit' #include <iostream> //libraries using std::cout; using std::cin; using std::endl; int menu(double pi); int circlearea(double pi); int circlecircum(double pi); //function declarations demanded shapes, passing pi in order reuse in both circle calculations int rectanarea(); int triangarea(); int cubvol(); void exit(); int main() { double pi = 3.14159265359; //declaration of pi using in circles (passed) menu(pi); system("pause"); return 0; } int menu(double pi) //menu choosing shape { int choice = 0;...

ios - Does a width of 44 pixels equate to the same physical size for all devices? -

i work based on screen size of iphone 6 1136x750 pixels @ 326 ppi. i'm more concerned physical size of buttons (for reason) rather digital sizes. if button has width of 44 pixels on iphone 6 , physical width of 0.2 inches has same physical width on iphone 6 plus 401 ppi? if not, isn't supposed violate apple's guidelines? had tested 44 pixels minimum width, bigger ppi same width decreases physically. is adjusted/scaled somehow? edit: have feeling i'm being stupid , obvious. edit 2: original concern across screen iphone 6 can have total of t = 375.0 / 44.0 = 8 buttons. while iphone 6 plus can have total of t' = 540.0 / 44.0 = 12 buttons each button being physically smaller. the way fix figuring out adjusted width of buttons iphone 6 plus w' = 44.0 px * 401 ppi / 326 ppi = 54.0 pixels. so, each button on iphone 6 plus should have width of 54 pixels of same physical size. am thinking correct? you're right math, points in ios ...

accessing an array of arrays java -

in code below have created 2 arrays, both of holding arrays. the first array testpayloadarray is supposed pass entire array within position of testpayloadarray. the runtimearray is supposed pass array within postion of array , within array populate run time value determinded method being used in. my execution rather incorrect, admit, unsure how move forward though. my thought that[i][j] best way this. corresponds position in first array , j corresponds position in second. if wanted populate third postion in second array in runtimearray code this, correct? runtimearray[1][2] = endtime - starttime; code below: ublic class main { public static void main(string[] args) { int arraylength = integer.parseint(args[0]); int[] sorteddecending = new int[arraylength]; int j = 0; int k = arraylength; for(int = arraylength; > 0; i--) { sorteddecending[j] = k; j++; k--; } j = 0; int[] samenum = new int[arraylength]; for...

php - Laravel protected attributes and Mutators -

i have problem laravel , protected $attributes , mutators. i have user ranking points. want add user model attribution ranking position. in user model have public function this: public function getrankpositionattribute(){ $userpoints= ranking::where('user_id','=',$this->id)->first(); $userposition = ranking::where('points','>',$userpoints->points)->count()+1; return $userposition; } i set: protected $attributes = array('rankposition'=''); but it's not working (i don't see value rankposition in attributes). strange thing when add (for example) value this: protected $attributes =array('test'=>'yes'); laravel don't see test... but when add this: protected $appends = array('rankposition'); and in controller find user , response json in json response see value rankposition correct value... :( what im doing wrong? why "my laravel" skips...

scala - accessing constructor variable in companion object -

getting compile time error following classes in same file class fancygreeting (greeting: string) { //private var greeting: string=_; def greet() = { println( "greeting in class" + greeting) } } object fancygreeting { def privategreeting(f:fancygreeting) : string = { f.greeting; } } error: value greeting not member of this.fancygreeting f.greeting; the same works if use private variable greeting instead of constructor you should write class fancygreeting(private var greeting: string) { if want have same behavior when use line commented out. way write (i.e. class fancygreeting(greeting: string) { ) giving greeting parameter constructor, without making property. this said, should not use ";" end lines in scala. moreover, better use val var , if can. note: this answer might interesting you.

rest - What is best practice in a Restful laravel app for Controllers and methods -

i developing restful laravel application , need know best practice implement routes, controllers , methods in laravel both support restful requests , http web requests can create resource controller , add following line routes file in laravel: route::resource('photo', 'photocontroller'); and in photocontroller need add following lines of codes returns json response photos: class photocontroller { public function index() { $photos = photo::all(); return response()-> json(['result' => $photos]); } } we need controller , method responds web http request , returns web page instead of json response displays photos web users question: best place put method , controller practice put inside same controller , returns view? following example class photocontroller{ public function getall(){ $photos = photo::getall(); return view('views',['photos...

Invoke a Service through Angular 2 -

Image
i trying consume service http://jsonplaceholder.typicode.com/posts in angular 2 my html under employee-information-apps.html -------------------------------- <button (click)="getdetails()" id="tbn1">invoke service</button> app.ts //our root app component import {component, ngmodule} '@angular/core' import {browsermodule} '@angular/platform-browser' import { httpmodule } '@angular/http'; // annotation section @component({ selector: 'my-app', template: ` <div style="width: 50%; margin: 0 auto;"> <employee-selector></employee-selector> </div> `, }) // component controller export class app { constructor() { } } // annotation section @component({ selector: 'employee-selector', templateurl: 'employee-information-apps.html' }) // component controller export class employeeinformation { http: http; constructor(private _http: ...

bootstrap 4 inline form: how to increase input width and preserve the form as inline in xs views -

i searched lot this, , couldn't find answer i use bootstrap 4 , have following code: <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.5/css/bootstrap.min.css"> <form class="form-inline text-xs-center"> <div class="form-group"> <input type="text" class="form-control"> </div> <button type="submit" class="btn btn-primary">go</button> </form> i have 2 problems @ diffirent resolutions . (1) @ sm or larger resolutions , result follows: click image the input , button inline , proper padding between them, , centered . how can increase width of inline input, preserving padding , center alignment (of both controls together)? (2) @ xs resoltion , result follows: (expand snippet, run it, , resize browser) click fo image i lost inline state of form, how can keep form inline @ resol...

javascript - Transferring data between userscripts on different domains -

there's way transfer data between pages on same domain , using localstorage, need transfer data between different domains. in chrome, tried using symbolic links domains share storage, items set in 1 domain aren't found @ other domain until reboot chrome. how transfer data between userscripts on different domains? i'll use browser that'll work. this'll personal use i include both domains using @include , use gm_getvalue , gm_setvalue store , retrieve data. i've included example on how use gm_registermenucommand function opens prompt when user selects option userscript addon popup. // ==userscript== // @name pinky // @namespace http://pinkyandthebrain.net/ // @version 0.1 // @description try take on world! // @author // @include https://domain1.com // @include https://domain2.com // @grant gm_getvalue // @grant gm_setvalue // @grant gm_registermenucommand // ==/userscript== /* global gm_g...

c - Underallocating memory for a union -

given declaration: struct s1 { int type; union u1 { char c; int i[10000]; } u; } s; i'm wondering whether can allocate less memory struct sizeof(struct s1) suggest: struct s1 * s_char = malloc(sizeof(int)+sizeof(char)); on 1 hand, seems intuitive: if 1 knows s/he never reach past char s_char.u.c , allocating whole sizeof(struct s1) looks big waste. on other hand, rather understand c11 standard against - it's never spelled out. 2 passages have found can understood being against these: if struct somehow assumes full size has been allocated, opens door undefined behavior: new object can allocated after s_char still inside of "real" sizeof(struct s1) bytes assumed struct, trigger item 54 of annex j.2 of c11 standard: ub if an object assigned inexactly overlapping object or overlapping object incompatible type (6.5.16.1). 6.2.6.1 paragraph 7: when value stored in member of object of union type, bytes of obj...

C# IF/ELSE statemenets -

Image
i need of code game calculator. wrote code, if/then statement acting weird. screenshot: - typed in p , should have gone else part of code, instead continued onto if part. please help! { class mainclass { public static void main(string[] args) // if rewrite source, original creditors must go credits! { double num01; double num02; double num03; double num04; double num05; double num06; string cd = null; string p = null; string answer = null; console.write("diogenes's calculator 1.0\n\ncredits: dos (#57714)\n dz(#54689)"); console.writeline(); console.writeline(); console.write("hello! charity donation or propaganda calculator? (cd or p): "); console.readline(); answer = convert.tostring(); if(answer == cd) { ...

git - Error with pod spec lint -

i want public framework. i have created pod spec in framework directory, fill pod spec information, type pod spec lint but gives me error: -> kpimageview (1.0.0) - error | [ios] unknown: encountered unknown error ([!] /usr/bin/git clone https://github.com/khuong291/kpimageview.git /var/folders/t5/rgq4j6cn7h79khx0xsftrjtw0000gp/t/d20161113-67362-1dxzrg4 --template= --single-branch --depth 1 --branch 1.0.0 cloning '/var/folders/t5/rgq4j6cn7h79khx0xsftrjtw0000gp/t/d20161113-67362-1dxzrg4'... warning: not find remote branch 1.0.0 clone. fatal: remote branch 1.0.0 not found in upstream origin ) during validation. analyzed 1 podspec. [!] spec did not pass validation, due 1 error. [!] validator swift projects uses swift 3.0 default, if using different version of swift can use `.swift-version` file set version pod. example use swift 2.3, run: `echo "2.3" > .swift-version`. my podspec: pod::spec.new |s| s.name = "kpimageview" s....

rails includes multiple 2 level associations -

i have table invoices column product. products table belongs other tables such categories, suppliers etc.. in view need display: invoice.product.category inventory.product.supplier i trying setup controller avoid n+1 queries. so did: @invoices = invoice.all.includes(product => category, product => supplier) i have bullet gem installed, , shows there/s n+1 query detected product => [category] , add finder::includes => [:category] it seems considering latest of includes , ignore others. suppose syntax wrong. how can fix it? you didn't symbolize models. @invoices = invoice.all.includes(:product => :category, :product => :supplier) this can shortened using array: @invoices = invoice.all.includes(:product => [:category, :supplier]) it's idiomatic put .where or .limit (or .all ) @ end: @invoices = invoice.includes(:product => [:category, :supplier]).all why not make scope? controller def index @invoices = invoi...

javascript - Keep legend constant and only update chart in D3 -

my coding plot x axis location, y axis (value1,value2 or value3) , legend types(high, medium,low). i'm trying add menu value1,2,3 , add legend different types if change either menu or click on legend, plot got updated selected data. however, code below able create legend set default type or clicked not able include types. there way include types in legends no matter type clicked , update chart accordingly? thank you, <script> var margin = {top: 20, right: 20, bottom: 30, left: 40}, width = 960- margin.left - margin.right, height = 900 - margin.top - margin.bottom, radius = 3.5, padding = 1, xvar = "location", cvar= " type"; default = "high"; // add tooltip area webpage var tooltip = d3.select("body").append("div") .attr("class", "tooltip") .style("opacity", 0); // force data update when menu changed var menu = d3.select(...

Excel VBA How to sort a single-row Range -

Image
i have range defined as set myrange=range("$e$10,$g$10,$i$10") the values in these cells -1, -1.2, 1 when iterate on range values printed in order of -1, -1.2, 1 i sort range when iterate on range see: -1.2, -1, 1 i not want reorganize these cells in actual worksheet. i trying mimic sort function in normal programming language, excel range, expect 'cells' re-arranged within range data structure i have tried naive myrange.sort key1:=myrange.item(1, 1), order1:=xlascending, header:=xlno but not anything excel not sort non-contiguous range. but using arraylist sort values easy ranges values in order. using sortanyrange it's desc parameter set true sort range in descending order. windows only sub testsortanyrange() sortanyrange range("$e$10,$g$10,$i$10") end sub sub sortanyrange(target range, optional desc boolean) dim r range dim list object set list = createobject("system.collections.array...

python 3.x - can I search for tweets generates in several geocodes? -

is possible write match more 1 parameter keyword? example more 1 geocode or more 1 language? i've tried kinds of combinations in next code nothing worked.i've tried pass list of geocodes , concatenated string or between geocodes. tweepy.cursor(api.search, q="*", geocode="47.47266286861347,-119.5751953125,169.47421829905642km", lang="en", since="2016-11-06", until="2016-11-12").items()) thank in advance.

Java: Incompatible types: ArrayList<Integer> cannot be converted to int -

i'm getting error states arraylist cannot converted int on return arr i'm writing program in have read ints file , calculate sum. i'm handling exceptions, if exception thrown, function should return 0. here code: public static int intfilesum(string filename) { arraylist<integer> arr=new arraylist<integer>(); inputstream fis=new fileinputstream(filename); scanner s=new scanner(fis); try { while (s.hasnextint()) { arr.add(s.nextint()); } } catch (filenotfoundexception e) { return 0; } catch (ioexception f) { return 0; } { fis.close(); s.close(); return arr; } } here unit test should pass once file read: public void testsumintshappypath() throws exception { int sum=assignment11.intfilesum("inputs/ints1.txt"); assert.assertequals(10, su...

angularjs - How to add a class css into directive? -

i have directive use change text of input uppercase , works fine, want show text capitalize when user type, note want keep text uppercase show user should capitalize. created css class don't know how use css directive. how add css class directive ? trying. css .textcapitalize { text-transform: capitalize; } directive var app = angular.module('starter'); app.directive('uiuppercase', function(){ return { require:'ngmodel', link: function(scope, element, attr, ctrl){ element.addclass('textcapitalize'); //show text capitalized var _textformat = function(input){ return input.length > 0 ? input.touppercase() : ""; } element.bind('keyup', function(){ ctrl.$setviewvalue(_textformat(ctrl.$viewvalue)); ctrl.$render(); }); } }; }); try this: a...

How to detect facebook message bubble is appearing android? -

i want know how detect message bubble running. log file found action when tap bubble: "com.facebook.orca.notify.action_clear_thread" "com.facebook.orca.notify.action_clear_friend_install" try catch broadcastreceiver can't listen. androidmanifest: <receiver android:name="facebookreceiver" android:enabled="true" android:permission="com.facebook.permission.prod.fb_app_communication"> <intent-filter android:priority="499"> <action android:name="com.facebook.orca.notify.action_clear_thread" /> <action android:name="com.facebook.orca.notify.action_clear_friend_install" /> <action android:name="com.facebook.orca.chatheads.action_show_chatheads" /> <action android:name="com.facebook.orca.chatheads.action_hide_chatheads" /> <action android:name="com....

java - Android background timer updating a Texview Item of Recyclerview -

i'm using handler create countdown timer inside of service class. timer works decreasing remaining time , works updating texview on item of recyclerview working. problem is, when application closed , reopen, timer no longer able update texview on item of recyclerview working. from recyclerview adapter i'm calling function service start timer. , of eventbus libray able change texview. ... @override public pageadapter.theviewholder oncreateviewholder(viewgroup parent, int viewtype) { if (!eventbus.getdefault().isregistered(this)) { //register eventbus library eventbus.getdefault().register(this); } view itemview = layoutinflater.from(parent.getcontext()).inflate(r.layout.custom_item, parent, false); return new theviewholder(itemview); } @override public void onbindviewholder(final pageadapter.theviewholder holder, int position) { holder.btn_start_countdown.setonclicklistener(new view.onclicklistener() { @override public v...

node.js - NodeJS -- cost of promise chains in recurssion -

i trying implement couple of state handler funcitons in javascript code, in order perform 2 different distinct actions in each state. similar state design pattern of java ( https://sourcemaking.com/design_patterns/state ). conceptually, program need remain connected elasticsearch instance (or other server matter), , parse , post incoming data el. if there no connection available elasticsearch, program keep tring connect el endlessly retry period. in nutshell, when not connected, keep trying connect when connected, start posting data the main run loop calling recurssively, function run(ctx) { logger.info("run: running..."); // starts disconnected state... return ctx.curstate.run(ctx) .then(function(result) { if (result) ctx.curstate = connectedst; // else remains in old state. return run(ctx); }); } this not recursive fn in sense each invocation calling in tight loop. suspect ends many promises in chain, , in long run cons...

jquery - A view to add and remove items from a collection on the same view -

i'm creating view allows user add , remove objects in list in particular way client wants. user has able add or remove multiple forms on page before submitting. when page posts needs display what's in list, option remove each item, plus allow user add/remove more objects before submitting again. i'm able use jquery , partial view let user add or remove new forms before submitting. can't figure out how provide button remove objects in list previous submit. can me out this? appreciated. here's i've figured out far. in view: @using (html.beginform()) { <div id="recipients"> @foreach (var p in model) { @html.partial("_recipient", p) } <div id="recipients0"></div> </div> <button id="add" type="button">add</button> <button id="remove" type="button">remove</button> <input t...

R- Graphing continuous data as a barplot with nonequal subsets -

i looking display dataset barplot in order show domains of data have more range variation others. although have found ways set barplot data domain broken down number of equal subsets, have not been able find way dictate numerical cutoffs of these subsets. cut() function has been giving me trouble, may because relatively new r. the scatterplot representation of dataset working is: zooplankton.data . able display average species diversity score each discrete ph score, such average score ph <4, ph <= 4 | ph < 5, etc. each own bar. the way have been trying solve using: ph.bins<-cut(zoo$ph, c(3,4,5,6,7,8)) bar.ph <- tapply(zoo$species.diversity, list(zoo$ph.bins), mean) barplot(bar.ph, main="average species diversity score ph", xlab = "ph", ylab = "average species diversity", col = "blue", ylim = c(3,8)) par(new=f) unfortunately, keep getting error telling my tapply() arguments need same length, ...

asp.net - How to generate the right connection string for MySql -

i have asp.net mvc site & using ef code first as database, using mysql . not getting right connection string. if mssql have generate using visual studio itself. is there quick way auto generate right connection string when using mysql. thanks. this useful <connectionstrings> <add name="mycontext" providername="mysql.data.mysqlclient" connectionstring="server=localhost;port=3306;database=mydbname;uid=my_user_id;password=my_password"/> </connectionstrings> tipically my_user_id = root https://dev.mysql.com/doc/connector-net/en/connector-net-entityframework60.html

Spring Cloud Config server Vs ZooKeeper -

we have few micro services interact each other , planning deploy them in docker.all developed in java spring boot.currently external service configuration in classpath application.yml. we looking move them centralized config.want know best approach spring cloud config server approach or zookeeper. advantage , disadvantage of 2 approaches. does zookeeper provide dynamic loding of poperties upon change? spring cloud config server support multiple node/cluster environment setup.

jquery - using localDB with Cordova(Visual Studio 2015) -

Image
i'm developing cross-platform mobile app using cordova (visual studio 2015) database, i've created localdb using visual studio features. now, want connect localdb , store data it, , select it. while researching through internet did not find how this, help?? the image below shows local db thanks in advance there several ways listed below use database in visual studio. need write web service in .net asmx service - simple build wcf service - involves more configuration, secured. asp.net web api - light weight web services http protocol. here step step approach create asmx service for these services either use entity framework or ado.net crud operations. i advise go asmx service using ado.net if new .net.

sql - android sqlite query no return? -

i have sqlite database , want query through db , populate listview return, listview shows 1 row return more 1 row , there no error. item class contains setters , getters. i use method query: filllist2(edtseach.getquery().tostring().tolowercase(),"zankodict", "id","eng",long.valueof(1),long.valueof(1794)); which method: private void filllist2(string keyword,string table, string columnn,string column2,long num1,long num2) { if (keyword.equals(buildconfig.flavor)) { this.mylist = new arraylist(); } else if (keyword.tochararray().length < 2) { mylist.clear(); mylist.add(dbquery.a(keyword,table,columnn,column2,num1,num2)); } else { mylist.clear(); mylist.add(dbquery.a(keyword,table,columnn,column2,num1,num2)); } mylistview.setadapter(new adapteren(getactivity(), r.layout.single_row, mylist,keyword)); } } dbquery.cl...

Trying to install Ruby gems on Synology DiskStation DS216j, cannot find Ruby header files -

i trying run ruby scripts on synology diskstation ds216j. managed install ruby 2.3.1 via opkg/entware-ng when try install gems native extensions, error: $ sudo gem install io-console building native extensions. take while... error: error installing io-console: error: failed build gem native extension. current directory: /volume1/@entware-ng/opt/lib/ruby/gems/2.3/gems/io-console-0.4.6 /opt/bin/ruby -r ./siteconf20161113-31591-ucvjgl.rb extconf.rb *** extconf.rb failed *** not create makefile due reason, lack of necessary libraries and/or headers. check mkmf.log file more details. may need configuration options. provided configuration options: --with-opt-dir --without-opt-dir --with-opt-include --without-opt-include=${opt-dir}/include --with-opt-lib --without-opt-lib=${opt-dir}/lib --with-make-prog --without-make-prog --srcdir=. --curdir --ruby=/opt/bin/$(ruby_base_name) /opt/lib/ruby/2.3/mkmf.rb:456:in `try_do': compi...

java - how to declare int as array[] and past the value from main class? -

how can fix problem? want change parameter , pvalue array import java.util.*; public class test5 { /** * @param args command line arguments */ int parameter[]; int pvalue[]; public test5(int para[], int pv[]){ parameter=para; pvalue=pv; } public void loopi(){ int = 0,j,k,l; scanner sc=new scanner(system.in); system.out.print("enter parameter : "); parameter[i]= sc.nextint(); char group = 'a'; for(i=1;i<=parameter[i];i++) { system.out.print("enter parameter value : "); pvalue[i]=sc.nextint(); for(j=1;j<=pvalue[i];j++) { system.out.print(" "+j+group+" \n"); } seat++; } } public static void main(string[] args) { // todo code application logic here int i[] = null; int j[] = null; t...

sql - When does DBwn update buffers in Database buffer cache to database disk? -

i learning basic knowledge oracle database architecture, , there 2 examples. the steps involved in executing data manipulation language (dml) statements. the steps involved in executing commit command. executing dml steps the steps follows: the server process receives statement , checks library cache shared sql area contains similar sql statement. if shared sql area found, server process checks user’s access privileges requested data, , existing shared sql area used process statement. if not, new shared sql area allocated statement, can parsed , processed. if data , undo segment blocks not in buffer cache, server process reads them data files buffer cache. server process locks rows modified. the server process records changes made data buffers undo changes. these changes written redo log buffer before in-memory data , undo buffers modified. called write-ahead logging. the undo segment buffers contain values of data before modified. undo b...

reporting services - RDLC details columns between two gouping columns -

Image
how put details columns between 2 grouping columns follow: this requires nested table. create 2 tables. 1 outer table empty column po number go. other list of po numbers. drag po number table details line in main table. here sample of working:

android - Splashscreen and main activity configuration -

i have application starting @ splash screen loading contact list, when finished, starts main activity ; best way configure these 2 in manifest , intent filters action ans category ? <activity android:name=".splashactivity" android:nohistory="false" android:theme="@style/apptheme.noactionbar"> <intent-filter> <action android:name="android.intent.action.main" /> <category android:name="android.intent.category.launcher" /> </intent-filter> </activity> <activity android:name=".mainactivity" android:label="@string/app_name" android:theme="@style/apptheme.noactionbar" android:launchmode="singletask"> <intent-filter> <action android:name="android.intent.action.main" /> <category android:name="android.intent.category.d...

laravel - Laravel5.3 maatwebsite/excel Read value from excel & insert into database -

Image
here excel data sheet type: here table schema: here method import data: public function saveactivationinfoexcel(request $request) { if($request->hasfile('import_file')){ $path = $request->file('import_file')->getrealpath(); $data = excel::load($path, function($reader) {})->get(); if(!empty($data) && $data->count()){ foreach ($data->toarray() $key => $value) { if(!empty($value)){ foreach ($value $v) { $insert[] = [ 'mobile_no' =>$v['mobile_no'], 'model' => $v['model'], 'serial_1' => $v['serial_1'], 'serial_2' => $v['serial_2'], ...

programming languages - How change class of a C++ object (implementing a variadic type) -

first off: know bad idea change object's class, i'm implementing own programming language, , has variables can contain values of type, , change type @ will, please assume i'm not beginner not understanding oo basics. currently, implement variant variables in c. each 1 has pointer table of function pointers, containing functions setasint() , setasstring() etc., followed instance variables in c++. objects same size. when variable contains string , assigns int it, manually call destructor, change table of function pointers point table used variadic int values, , then set int instance variable. this bit hard maintain, every time add new type, have add new table of function pointers , fill out all function pointers in it. structs of function pointers seem badly type-checked, , missing fields don't lead complaints, can accidentally forget 1 pointer in list , interesting crashes. also, have repeat function pointers same in types. i'd implement variadic types...