Posts

title2

title2

title3

title3

title3

title3

title2

title2

titl1

titl1

titl1

titl1

android - illegalstateexception did not create a view when screen orientation changes -

i have been trying make app opens listview fragment (gradelistfragment) activity (gradelistactivity). when click item, opens new fragment (gradedetailfragment). if in portrait mode, replaces list fragment in fragment1. if in landscape, replaces empty fragment2. problem app crashes when switch orientation. switching both perspectives gets same error. 04-09 12:10:52.240: e/androidruntime(2221): fatal exception: main 04-09 12:10:52.240: e/androidruntime(2221): process: bcs421.christophergoepfert.hwk.gradeapp.presentation, pid: 2221 04-09 12:10:52.240: e/androidruntime(2221): java.lang.runtimeexception: unable start activity componentinfo{bcs421.christophergoepfert.hwk.gradeapp.presentation/bcs421.christ ophergoepfert.hwk.gradeapp.presentation.gradelistactivity}: android.view.inflateexception: binary xml file line #8: error inflating class fragment 04-09 12:10:52.240: e/androidruntime(2221): @ android.app.activitythread.performlaunchactivity(activitythread.ja...

arrays - Pointer to a pointer in C not working as expected -

i learning pointers in c. have 2d array of integers , i'm trying add elements in single row. 2d array name a . know a pointer array rows, pointers integer elements. want loop on entire array a . so, declared pointer **pp equal a , since a pointer pointer. program crashing @ run time. int main(void){ int sum=0; int a[3][3] = {{1,2,3},{4,5,6},{7,8,9}}; int **pp = null; int *p = null; (pp=a;pp<a+3;pp++){ (p=*pp;p<*pp+3;p++) sum += *p; printf("sum = %d\n", sum); sum = 0; } } i know address of first object of 2d array a . address of second object a+1 , on. matrix element i,j example *(*(a+i)+j) . in order words, if set pointer variable pp (a+i) , know i'm in i-th row. address of first integer element of i-th row *(a+i) , why made p=*pp . element (i,0) should *p same *(*(a+i)+0) . so, why isn't code running should ? following code works though needs cast : int main(void){ int sum = 0; int a[3][3] = { { ...

c# - How can I add a blank line to my StringBuilder? -

it known "issue" doing this: sb.appendline(); ...will not add blank line, 1 expect (as discussed here , instance). however, commonly believed work: sb.appendline(environment.newline); ...but it's not working me. i've got code: for (int = 0; < listoflistitems.count; i++) { sb.appendline(environment.newline); lc = listoflistitems[i]; sb.appendline(string.format(@"<p>request date {0}; payee name {1}; remit address or mail stop {2}; last 4 of ssn or itin {3}; 204 submitted or on file {4}; requester name {5}; dept or div name {6}; phone {7}; email {8}</p>", lc.li_requestdate, lc.li_payeename, lc.li_remitaddressormailstop, lc.li_last4ssndigitsoritin, lc.li_204submittedoronfile, lc.li_requestername, lc.li_deptdivname, lc.li_phone, lc.li_email)); } all data being added stringbuilder, , form gets generated, there no spaces between list items - "sb.appendline(environment.newline)" appending nothing. what...

sprite kit - How to stop/cancel playSoundFileNamed in Swift? -

i'm trying make button, when pushed - sound played, , when pushed again - sound stop. i'm using playsoundfilenamed: runaction: withkey: , removeactionforkey , doesn't work. the other question have if there way not stop sound, pause (so start same part paused, not beginning). i've seen similar topic @ stack overflow, yet didn't find answer on question yet. thank in advance. import spritekit import avfoundation var firesoundon = false private var backgroundmusicplayer: avaudioplayer! class gamescene2: skscene { override func didmovetoview(view: skview) { setupscenery() } private func setupscenery() { //background let background = skspritenode(imagenamed: backgroundimage, normalmapped: true) addchild(background) //fire button var firepath = uibezierpath() firepath.movetopoint(cgpointmake(0, 0)) firepath.addcurvetopoint(cgpointmake(115, 215), controlpoint1: cgpointmake(5, 170), controlpoint2: cgpointmake(90, 190)...

sqlite - Android Studio - create database with multiple columns -

i want create database 3 columns (name of point of interest, longitude , latitude). since new databases using example found online , try change case. problem works 1 column if add other 2 breaks. code: taskcontract import android.provider.basecolumns; public class taskcontract { public static final string db_name = "com.example.todolist.db.tasks"; public static final int db_version = 1; public static final string poi_names = "tasks"; public static final string longitudes = "longs"; public static final string latitudes = "lats"; public class columns { public static final string poi = "task"; public static final string _id = basecolumns._id; public static final string longitude = "long"; public static final string latitude = "lat"; } } taskdbhelper import android.content.context; import android.database.sqlite.sqlitedatabase; import andr...

kohana - Class 'Model_register' not found -

good day ladies , gentlemen, i've upgraded kohana 3.1.x latest 3.3.x version , im getting error: errorexception [ fatal error ]: class 'model_register' not found can me? follow upgrade guides 3.1.x => 3.2.x , 3.2.x => 3.3.x . with 3.2.x kohana changed naming conventions psr-0 compliant. means if class called kohana_core located in classes/kohana/core.php have change classes/kohana/core.php . have either upgrade modules current versions, or fix naming (which lot of work). the issue seeing related change of naming conventions. if isn't, module caues error?

javascript - Dynamically set active menu item using data-toggle -

i have menu included in file , b. don't want of tabs active @ first after clicking on them want set correct list item's class="active". thought code below it. need add or change? <ul id="navbar_menu" class="nav nav-tabs"> <li><a data-toggle="tab" href="#">a</a></li> <li><a data-toggle="tab" href="#">b</a></li> </ul> fyi: have included following html page (do need more this): href="http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css"> http://getbootstrap.com/javascript/#tabs according bootstrap's documentation (under title "markup"), still missing html. so right, except need link's href point id of actual tab, , not hash mark # . <ul id="navbar_menu" class="nav nav-tabs"> <li><a data-toggle="tab" hr...

asp.net web api - Why is Serilog(.Extras.)Web's ApplicationLifecycleModule.Init() called twice? -

i'm hosting web api in iis (7.5) application under "default web site" , , using several of enrichers serilog.extras.web (i'll upgrading serilogweb.classic package). noticed in logs applicationlifecyclemodule.logrequest() being called twice each request, , i'm trying understand why. what noticed applicationlifecyclemodule.init() being called twice, registering 2 event handlers. the first callstack: serilog.extras.web.dll!serilog.extras.web.applicationlifecyclemodule.init(system.web.httpapplication context) system.web.dll!system.web.httpapplication.registereventsubscriptionswithiis(system.intptr appcontext, system.web.httpcontext context, system.reflection.methodinfo[] handlers) system.web.dll!system.web.httpapplication.initspecial(system.web.httpapplicationstate state, system.reflection.methodinfo[] handlers, system.intptr appcontext, system.web.httpcontext context) system.web.dll!system.web.httpapplicationfactory.getspecialapplicationinstance(system.i...

php - How to store an image from memory in MySQL -

i'm trying upload image, change size , write result mysql database. basic code: // load original image $image = imagecreatefromjpeg($file); // load original image // create new image $newimage = imagecreatetruecolor($newwidth, $newheight); // copy original new, changing size imagecopyresampled($newimage, $image, 0, 0, 0, 0, $newwidth, $newheight,$origwidth, $origheight); // save new image in database (in blob field) mysql_query("update mytable set photo='" . mysql_escape_string($newimage) . "' keyfield=2"); but nothing stored. $newimage appears valid image of correct size. failing do? as @wayne said . suggest save image in file system , save file path in database here code copy image filesystem $imagepath="c:/your/file/complete/path"; if(isset($_files["file"])){ move_uploaded_file($_files["file"]["tmp_name"], $imagepath); mysql_query("update mytable set phot...

ios - FBSDKLoginManager: undefined symbols for architecture x86_64 + linker command failed with exit code 1 -

i upgraded facebook ios sdk v.4.0.1 , got these errors: undefined symbols architecture x86_64: "_objc_class_$_fbsdkloginmanager", referenced from: objc-class-ref in controller1.o objc-class-ref in appdelegate.o objc-class-ref in controller2.o ld: symbol(s) not found architecture x86_64 clang: error: linker command failed exit code 1 (use -v see invocation) i tried change linkers: -all_load same error, while -force_load becomes "ld: file not found: -fobjc-arc". solutions? i ran same problem. if you're adding facebook login app (which presume are) need drag fbsdkloginkit.framework file xcode project in addition fbsdkcorekit.framework file . the current instructions on facebook's sdk getting started page forget mention this. in version < 4 of sdk, there 1 file drag in project.

javascript - jQuery $.post doesn't send data -

i'm trying send data via $.post when i'm check network section of firefox, seems data never sent, yet success event triggered. don't know what's wrong... tried $.post , $.ajax , got same result. html <button id="nuevoadmin">agregar administrador</button> <article id="addadmin"> <form id="newadmin"> <label>nombre</label> <input type="text" name="nomadmin" required/> <label>puesto</label> <select name="puesto" id="jobs"> </select> <label>correo electrónico</label> <input type="email" name="emailadmin" required/> <span class="vacio">campo requerido</span> <span class="malcorreo">introduzca una dirección de correo válida</...

I am not able to fetch single record from access database in C#.Net -

i doing project on library management system. want fetch data student using borrower number select query. code not working giving exception type mismatch in criteria expression @ line number 40 dadapter.fill(datatable);. please me. here code. thank :) using system; using system.collections.generic; using system.componentmodel; using system.data; using system.drawing; using system.linq; using system.text; using system.windows.forms; using system.data.oledb; namespace librarymanagment { public partial class viewstudent : form { private oledbconnection bookconn; private oledbcommand oledbcmd = new oledbcommand(); //parameter mdsaputra.udl private string connparam = @"provider=microsoft.jet.oledb.4.0;data source=e:\mini\database\library.mdb;persist security info=false"; public viewstudent() { bookconn = new oledbconnection(connparam); initializecomponent(); } private void btnview_click(object sender, eventargs e) { ...

javascript - SharePoint - URL link with user name and password -

my requirement have link site uses read-only user name , password. i tried using https://username:password@server.domain.net:8097/db_id=360&action=1&pm=p&device_id=&bc=0/ still prompted enter password. i tired these 2 scripts , neither 1 worked. have suggestions? <asp:hyperlink id="server_resources" runat="server" navigateurl="https://server.domain.net:8097/db_id=360&action=1&pm=p&device_id=&bc=0">server resources <input type="hidden" id="userid" name="userid" value="username"/> <input type="hidden" id="pwd" name="pwd" value="password"/> </asp:hyperlink> <script> <form id="nadali" name="nadali" runat="server" action="https://server.domain.net:8097/db_id=360&action=1&pm=p&device_id=&bc=0" method="post" > <input type...

Carbon app does not receive kEventWindowDrawContent on unhiding -

i noticed old carbon application not receive keventwindowdrawcontent when unhiding application. can solve problem redrawing once keventwindowexpanded event i'm still confused why app doesn't keventwindowdrawcontent event when app brought hidden state. i checked old apple docs , there's no explicit mentioning keventwindowdrawcontent sent when app unhidden, common sense implies should sent because app needs redrawn. i initial keventwindowdrawcontent message when opening window, though, event handler must have been installed correctly. does remember old carbon stuff? keventwindowdrawcontent supposed sent on unhiding or not? this answer received apple engineer: keventwindowdrawcontent sent when window content has been invalidated. don’t invalidate window content default when window expanded minimized state; window buffer kept valid while window minimized (so drawing window reflected in window’s dock tile), it’s assumed unless app explicitly inv...