Posts

Why does my app force close on moving from one fragment to another on a ImageView click in Android? -

i trying move mycontacts extends fragment tasks extends fragment on clicking imageview . imageview in listview generated using simpleadapter .the ids of layouts follows: r.id.tasky tasks fragment, r.id.mycontacts mycontacts fragment. codes , error logs follows. new fragments kindly explain me step step. mycontacts extends fragment purple.setonclicklistener(new onclicklistener() { @override public void onclick(view v) { // todo auto-generated method stub android.app.fragmenttransaction t = getactivity().getfragmentmanager().begintransaction(); fragment fragment = new tasks(); fragmentmanager fragmentmanager = getactivity().getsupportfragmentmanager(); fragmenttransaction fragmenttransaction = fragmentmanager.begintransaction(); fragmenttransaction.replace(r.id.tasky, fragment); fragmenttransaction.addtobackstack(null); fragmenttransaction.commit(); } }); error logs: 04-22 04:41:52.486: e/fragmentmanager(3250): ...

Creating two separate websocket connections for send and receive on localhost -

i new websockets. it expected send data(any data) on send websocket connection using port(ex:8000) , localhost should echo same data browser using different websocket connection through different port(ex:9000). i understand websocket supports full duplex communication on single connection,but above design implement. question 1) above design possible? question 2) if yes,how create 2 websocket connections(one send , 1 receive) single localhost websocket server? 1) yes. 2) creating 2 separated websockets. different objects though. you blend both objects in composite object this: var compositewebsocket = function(urlsend, urlreceive){ var me = {}; var wssend = new websocket(urlsend); var wsreceive = new websocket(urlreceive); var open = 0; wssend.onopen = opening; wsreceive.onopen = opening; var opening = function(){ if(open == 2){ if(me.onopen) me.onopen(); } else open++;...

Qt License in next versions -

can lgpl license in newest version of qt changed? ofcourse new versions can have diffrent license, , can released without lgpl license. how released qt? can license changed? i'm not talking qt, generally. of course license can changed @ time, doesn't affect code have, unless license had under explicitly time-limited allow such changes. suppose i'm author of bobulator project. i've released version 1.0 under bsd license. you've downloaded , using in own project. sometime later decide not offer project under open source license. take source down website , that's last hears it. except have downloaded , have it, , can use subject terms of license code released under. include, example, internet archive :) case in point: vivacore library now , then . it's based on prof. chiba's opencxx . oops. internet remembers :) of course library's provenance wasn't meant secret . i'm not lawyer.

c# - How to convert linq expression to dictionary<string,string> -

can me, how convert linq expression dictionary? following code throwing me argumentexception: item same key has been added. idictionary<string, string> listallcourseswithareaasdictionary = new dictionary<string, string>(); var dictionary = (from b in booklistrecord select new { b.coursecode, b.area }).distinct(); listallcourseswithareaasdictionary = dictionary.asenumerable().todictionary(x => x.coursecode, x => x.area); return listallcourseswithareaasdictionary; when try this: listallcourseswithareaasdictionary = dictionary.asenumerable().todictionary(x => x.coursecode); i error: cannot implicitly convert type 'system.collections.generic.dictionary' 'system.collections.generic.idictionary'. explicit conversion exists (are missing cast?) agreed aharon, you're looking grouping operator: var dictionary = booklistrecord .groupby(g => g.coursecode) ...

Laravel 4 pagination - Can't get past page 1 -

i have created of search feature, user can choose type, pool, date , time. can't seem make paginator work, when click on page 2 results disappear. i have tried append $query->links() function, none of tries have yet succeeded. the url looks this: http://localhost:8080/nih/public/bassengweb/data?time_maling=1&pool_id=1&fradato=14%2f04%2f2014&tildato=22%2f04%2f2014&fratid=00%3a01&tiltid=23%3a59 the code view file: @extends('default') @section('content') <h1>admin sØk</h1> {{ form::open(array('url' => 'bassengweb/data', 'method' => 'get')) }} <table> <tr> <td>{{ form::label('time_maling', 'timemåling') }}</td> <td>{{ form::checkbox('time_maling', 1) }}</td> <td>{{ form::label('3_time_maling', '3. timemåling') }}</td> <td>{{...

jquery - Load Partial view in ajax call -

i new mvc . started creating 1 project , faced 1 big problem. pls me this. explanation: have view 1 actionlink , loading 1 partial view @model list<muthutag.models.loadpostmodel> @{ viewbag.title = "loadpost"; } @html.actionlink("add new post","post","home") <h2>loadpost</h2> <div> <table> @foreach (var item in model) { <tr> <td> @item.tagid </td> <td> @item.tagtitle </td> <td>@item.tagcontent</td> </tr> } </table> </div> in u can click add new post action link ill load view controller code public actionresult post() { return view(); } it ill load view @model muthutag.models.loadpostmodel @{ viewbag.title = "add new post"; } <script src="~/content/jqu...

PHP Protected access to pages within set sessions -

<?php ob_start(); session_start(); include 'connection.php'; $username = $_session['user']; ?> <!doctype html> <html lang="en"> <head> <title>home page</title> <meta charset="utf-8" /> <link href="../css/my_design.css" media="screen" rel="stylesheet" type="text/css" /> <link href="../css/homepage.css" media="screen" rel="stylesheet" type="text/css"/> <link href="../css/bootstrap.css" media="screen" rel="stylesheet" type="text/css"/> </head> <div id="wrapper"> <body> <!-- header row --> <div class="grid10 first"> <?php include 'header.php'; ?> </div> <!-- 2 column row - content , navigation columns -->...