Posts

Showing posts from June, 2012

c++ - 'unchecked_mismatch' : is not a member of 'stdext -

i have been using visual studio 2005 project long time. following call has never failed. stdext::unchecked_mismatch however once upgrade visual studio 2012 same call results in error error c2039: 'unchecked_mismatch' : not member of 'stdext' error c3861: 'unchecked_mismatch': identifier not found i wonder if has been moved other library or it's no longer supported. thanks in advance. i wonder if has been moved other library or it's no longer supported. well, unchecked_mismatch not part of visual studio stdext library anymore. so, it's no longer supported.

c# - How to wait for a file to be released by another external process? -

i creating file using pdfcreator command line using process and start() . wait sometime using waitforexit() else kill process , use waitforexit() again. after these steps output file created , not. check if file.exist() , access output file. the issue facing though process creating file either killed or returned , file being used process (probably other process created pdfcreator or spooler not sure) so wait() 3 seconds , poll again x number of tries, throw exception failure. i need move created files, , need check if file exists, wait until other process using releases or (probably find process using , kill it?). if file not exit, can proceed failure case. how go it? i can try move, if exception process using can poll , wait . but clean way approach? not sure why file in use after process has been killed or returned. your root issues fact using "kill" on creation process before has completed task. ideally should wait completion before

php - retrieving in-memory cached objects as a reference -

i'm using static method of class never instantiated create objects. objects differentiated id value. i'm trying cache objects subsequent requests of same id return reference created object. demonstration code below: class abc { static $cache = array(); static function get( $id ) { if ( isset( static::$cache[$id] ) ) { return static::$cache($id); } static::$cache[$id] = new abc(); return static::$cache[$id]; } } $ids = array(1,1,1,2); foreach( $ids $id ) { abc::get($id); } this not work. when change value of 1 object independent of other objects same id. tried placing '&' in front of function name , before method call no avail. two questions: 1. how can this. 2. necessary or there better way? thanks.

html5 - change content of a div with internet explorer additional comments? -

hello friends have html5 animation within div of website, want internet explorer 6 instead of animation display image, possible conditional comments? thank much. code animation in cabecera div: <div id="contenedor"> <div id="cabecera" > <iframe src="<?php $_server['document_root']?>/header.html" width="900px" height="167px" frameborder="0"> </iframe> </div> <div id="botonera"><?php include($_server['document_root']."/botonera.php"); ?></div> <div id="sombra"></div> <div id="para-contenido"></div>

mysql - PHP PDO Internal Server Error -

i trying insert table using pdos (mysql) connect file: try { $con = new pdo('mysql:host=sadf;dbname=sadf','sadfsdaf1','asdfsdaf'); $con -> setattribute(pdo::attr_errmode, pdo::errmode_exception); } catch(pdoexception $e) { echo("<h2>error: unable connect database </h2>"); echo $e->getmessage(); //insert errors database } code: $sql = "insert domains (team_id,domain_id,name,description,date,user_id) values (:team,'',:name,:desc,now(),:user)"; $query = $con->prepare($sql); $query->bindparam(':team', $team_id); $query->bindparam(':name', $name); $query->bindparam(':desc', $description); $query->bindparam(':user', $user_id); $query->execute(); i keep getting error , rest of page doesn't load. internal server error.

html - not getting image from css background:url -

the image doesn't show index.html <div id="headerwrap"> <h1>make landing pagelook good.</h1> </div><!-- /headerwrap --> css #headerwrap { background: url(../img/bbblur.jpg) no-repeat center top; margin-top: -20px; padding-top: 200px; background-attachment: relative; background-position: center center; min-height: 650px; width: 100%; -webkit-background-size: 100%; -moz-background-size: 100%; -o-background-size: 100%; background-size: 100%; -webkit-background-size: cover; -moz-background-size: cover; -o-background-size: cover; background-size: cover; } previously working shows image when preview it, add few codes preview agian, messed up, tried undo move, still doesn't show image

java - Recipe App , best way to make selection for recipes? -

so designing app libgdx , kind of simple app anyway. recipe guide app. best way render selection screen recipes , thinking create table , display recipes , make clickable / touchable. don't know first way start doing in libgdx or if theirs better alternative. ok tried make work getting error , know error means having difficult time finding null; more eyes better one. err two. this class recipescreen private textureatlas atlas; private sprite sprite; private orthographiccamera camera; private assetmanager assets; private spritebatch batch; int[] blockmenu = new int[100]; public recipescreen(){ } public void create(){ camera = new orthographiccamera(720,1280); assets = new assetmanager(); if (gdx.app.gettype() == applicationtype.android){ assets.load("data/akemix.pack", textureatlas.class); assets.finishloading(); } else { assets.load("bin/data/bakemix.pack", textureatlas.class); assets.finishloading

Oracle SQL: How to get distinct values of a particular column from 5 different tables? -

i have 5 different tables , 1 column common in 5 tables. need 50 distinct values of column in 1st table, in second table need 50 distinct values of same column not appear in list of 50 values received in result 1st table. in way, need 250 unique values 5 tables. cannot use temporary table since don't have write access in database , can use select. can suggest solution problem? or pointers highly appreciated! example: suppose have 5 tables employees, greenhouse_emp, redhouse_emp, bluehouse_emp, yellowhouse_emp , greyhouse_emp; the column common in 5 tables emp_id. i want 50 distinct emp_ids greenhouse_emp table, 50 distinct redhouse_emp not including 50 selected greenhouse_emp table , on.. the end result should 250 employees having 50 distinct of each catagories. http://blog.codinghorror.com/a-visual-explanation-of-sql-joins/ first @ link see how joins work. visual representation helpful. asking want 5 tables joined off of 1 common column.. values want disti

32 bit - how to allocate memory to store register number? -

i learned register field specify 1 out of 64 registers takes 6 bits. since 64 = 2 6 but don't have consider right bit ?, 2 0 , in case require 7 bits specify 1 out of 64 registers.. if there 1 possible value, need no bits @ all. if have 1 bit, has 2 possible values. so if there 1 register, no bits needed @ select it. if there 2 registers, you'd need 1 bit -- 0 in bit select 1 register, 1 other. continuing, if have 2 bits, have 4 possible values. if have 3 bits, have 8 possible values. going up, 6 bits has sixty-four possible values, that's sufficient chose 1 of sixty-four registers.

Error while editing data in gridview in ASP.NET -

i making online bug tracking system(bts) in asp.net. using gridview displaying records on web page. working in web forms in web forms, getting error given below when click edit event of gridview. please guide me solve error. server error in '/bts' application. invalid postback or callback argument. event validation enabled using <pages enableeventvalidation="true"/> in configuration or <%@ page enableeventvalidation="true" %> in page. security purposes, feature verifies arguments postback or callback events originate server control rendered them. if data valid , expected, use clientscriptmanager.registerforeventvalidation method in order register postback or callback data validation. just --> enableeventvalidation="false" below <%@ page title="" language="c#" masterpagefile="~/shirish.master" autoeventwireup="true" codefile="s.aspx.cs" inherits=&q

c# - Cannot implicitly convert type 'System.Linq.IQueryable? -

here code giving me above error public actionresult edit(int id = 0) { kbs_virtual_trainingentities db = new kbs_virtual_trainingentities(); userscontext ctx = new userscontext(); userprofile model = ctx.userprofiles.find(id); list<coursesubscription> user_course_subscriptions = new list<coursesubscription>(); foreach (usersubscription sub in db.usersubscriptions) { if (sub.id == id) { user_course_subscriptions.add(sub.coursesubscription); } } list<coursesubscription> not_subscribe = db.coursesubscriptions.except(user_course_subscriptions); var courseslist = courses in not_subscribe select new selectlistitem { text = courses.course.name, value = courses.course.id .tostring()

css - html table scroll color -

this question has answer here: how change scrollbar color using css [duplicate] 2 answers i new html/css world. need change scroll bar color of table. understand how make scrollbar appear, don't know how change scrollbar color. need work in ie11. ( can't use javascript or else...just plain html/css) thanks help. try these css properties: scrollbar-face-color scrollbar-shadow-color scrollbar-highlight-color scrollbar-3dlight-color scrollbar-darkshadow-color scrollbar-track-color scrollbar-arrow-color

java - Differnce between addfirst and offerFirst methods in ArrayDeque -

have tried out sample program understand difference between addfirst , offerfirst methods in arraydeque of java 6. seem same, suggestions? public void interfacedequetest() { try{ arraydeque<string> ad = new arraydeque<string>(); ad.addfirst("a1"); ad.offerfirst("o1"); ad.addfirst("a2"); ad.offerfirst("02"); ad.addfirst("a3"); system.out.println("in block"); (string number : ad){ system.out.println("number = " + number); } } the difference happens when addition fails, due queue capacity restriction: .addfirst() throws (unchecked) exception, .offerfirst() returns false . this documented in deque , arraydeque implements. of note arraydeque has no capacity restrictions, .addfirst() never throw exception (and .offerfirst() return true ); unlike, instance, linkedblockingqueue built ini

c# - Unmanaged DLL doesn't work in Windows 7 -

last week stumbled upon problem , i'm not sure how solve it. spent whole day try solve alone. i have unmanaged dll worked fine in c# code on windows xp (32 bit) system. when try run c# code on newer system (for example windows 7 (64 bit) doesn't work anymore. this code [dllimport("mytest.dll")] [return: marshalas(unmanagedtype.lpstr)] public static extern string dosomething(); as said works fine on windows xp system doesn't work on windows 7 system. when try run code on windows 7 system following exception (translated english) the dll "mytest.dll": recurrence deep, stackoverflow. (exception hresult: 0x800703e9) can not loaded. i'm guessing problem because of this: load 32bit dll library in 64bit application how call win32 dll in windows 7 i'm not sure because when search exception in combination dllimport can't find anything. if problem best solution? you check: unmanaged dll dependencies dependency wal

p2p - BitTorrent Optimistic Unchoke/Bandwith probing -

while thinking how bittorrent works, few questions come mind. appreciate if can share few possible responses. suppose bittorrent gets 50 peers tracker , establishes connection 20 of them form peer-set. peer-set randomly selected or based on bandwith? (i understand peers unchoked selected based on offered bandwidth) subsequently, how bandwidth determined each connection (a ping can give latency not bandwidth assume) the optimistic unchoke leads problem of free-riders in system. considering unchoke might not result in better peers, why not possible discard policy @ all? (i assume policy helps peers slow bandwith fulfill requests, why cannot bittorrent adopt policy probe bandwith of optimistic peer without sending data packets; , have (maybe 5th connection) low-bandwidth peers don't starve. 5th channel transmit @ fraction of bandwith compared other 4 channels) may @ least discourage free-riding? traditionally peers selected @ random. clients may have had weak biase

c# - Filter duplicates from a list to populate ComboBox -

i've been looking way filter out duplicates list populate form, far have found create duplicate list either hashset or other methods involve grouping duplicates separate list, i'm not interested in keeping extras. currently i'm getting in combobox is: 123 123 456 456 789 789 etc... trouble is, i'm collecting data in models (or classes) such: list<modelname> modelname<1> { string name = bob; int number = 123; } modelname<2> { string name = jim; int number = 123; } modelname<3> { string name = bob; int number = 456; } is there way fill list unique classes: modelname<1> { name; number; } modelname<2> { name; } modelname<3> { number; } and filter out , dispose of double ups? you can use linq distinct operator remove duplicates collection: var listwithoutduplicates = listwithduplicates.distinct().tolist(); if want customize way elements compared equality can use ov

c++ - class object also managing a tree structure? -

i'm working on class hierachy, object of class may contain several objects of same class. lead tree structure: class myclass { myclass *parent; std::vector<std::unique_ptr<myclass> > childs; /* * here more attributes describe myclass object * not related tree structure. * std::string name; example */ public: //constructors... //tree management functions //some more members... } however, after thinking while, think bad practise. in approach, myclass not needs have members related actual behaviour managing tree, searching or inserting childs. lot of different functionality in 1 single class. and, lazy programmers, don't re-invent wheel. there tree-containers out there, example well-known "tree.hpp". why not using container storing myclass objects? well, problem is, members ob myclass require access parents. imagine member-function getfullname(), returns not "name"-attribute complete path actual

Few Hibernate Entities Implement Serializable where as Few Doesn't...Reasons? -

i saw in application code base few hibernate entities implement serializable interface few doesn't... could me reasons when required , when doesn't? also, why @entity not being sufficient take care of serialization thanks.

r - l_ply: creating plots from a list of data frames of groupedData class -

im new r user i'll try post correctly...... have r list this: > summary(groupdata_ls) length class mode 5 3 nfngroupeddata list 10 3 nfngroupeddata list 15 3 nfngroupeddata list i've made function create groupeddata object variables 'lma','campaign', , 'id' grouping factor. used function inside dlply create list of groupeddata objects, splitting original data frame 'volume' (5, 10, 15, etc). code generates list above: grp_func <- function(dfr){ sub_dfr <- subset(dfr, select = c("id", "campaign", "sla")) sla.new <- groupeddata(sla ~ campaign|id, data=sub_dfr) } groupdata_ls<- dlply(dfr, .(volume) , grp_func) i use l_ply generate trellis plots (lma ~ campaign) each volume. i can generate them subset of 1 volume (15) raw dfr: vol_15 <- dfr[dfr$volume == "15",] sla_15 <- groupeddata( sla ~ campaign | id, data =

Change layout using a spinner in Android -

i'm trying change layout of activity according selection inside spinner. after first selection, spinner become white , i'm not able decide selection. code i'm using following: public class mainactivity extends activity implements onitemselectedlistener { spinner spinner; string[] options = { "modulo1", "modulo2" }; @override protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.activity_main); spinner = (spinner) findviewbyid(r.id.spinner); arrayadapter<string> adapter_state = new arrayadapter<string>(this, android.r.layout.simple_spinner_item, options); adapter_state .setdropdownviewresource(android.r.layout.simple_spinner_dropdown_item); spinner.setadapter(adapter_state); spinner.setonitemselectedlistener(this); } int check = 0; public void onitemselected(adapterview<?> parent, view view, int position, lon

linux - Pattern search within directory -

how find particular pattern in files , sub-directories within directory? exact word can searched using find grep , exec. how find below: 'match=true' there may or may not multiple spaces around '='. this finds match=true 0 or more ( * ) whitespace characters ( \s ) around equals sign ( tab , although uncommon between non-whitespace characters, valid character around equals sign in many languages): grep 'match\s*=\s*true' if want match 0 or 1 whitespace, can use \? instead of * above.

android - CSS Background COVER property doesnt works on Phone -

Image
i'm experiencing strange issue: when open website on android 4.1 phone (default browser), background image doesnt cover background should. here screen phone: pieces of code, according background attributes: ... <meta name="viewport" content="width=device-width"> ... background: #fff url('img/main_bg.png')no-repeat center center; -webkit-background-size: cover !important; -moz-background-size: cover; -o-background-size: cover; background-size: cover; filter: "progid:dximagetransform.microsoft.alphaimageloader(src='img/main_bg.png', sizingmethod='scale')"; -ms-filter: "progid:dximagetransform.microsoft.alphaimageloader(src='img/main_bg.png', sizingmethod='scale')"; although, things i've tried setting min-hegith , width property @ 100 % - didnt make things work. hope have ideas, how figure out issue. try following code snippet. seems problem of native android browser pa

java.util.scanner - Terminate Java Program on Ctrl+Z input from user -

i have following code: string inputstring; scanner in = new scanner(system.in); while (true) { system.out.print("jcp>"); inputstring = in.nextline(); string[] tokens = inputstring.split(" "); switch (tokens[0]) { case "new": createnewinstance(tokens); break; case "call": callmethod(tokens); break; case "print": object obj = hashmap.get(tokens[1]); print(obj); break; default: system.out.println("illegal command!"); break; } } i want program break out of while loop when user hits ctrl+z ctrl+z exit program bad, ctrl+c|ctrl+d ends program execution on terminal, same way expect us

sql server - How can I make child rows delete when I delete a parent row? -

i have following ddl: create table [dbo].[test] ( [userid] nvarchar (128) not null, [testid] int identity (1, 1) not null, [examid] int not null, [title] nvarchar (100) null, [status] int not null, constraint [pk_test] primary key clustered ([testid] asc), constraint [fk_testexam] foreign key ([examid]) references [dbo].[exam] ([examid]) ); create table [dbo].[testquestion] ( [testquestionid] int identity (1, 1) not null, [testid] int not null, [thisanswered] bit default ((0)) null, constraint [pk_testquestion] primary key clustered ([testquestionid] asc), constraint [fk_testquestion_test] foreign key ([testid]) references [dbo].[test] ([testid]) ); go create nonclustered index [testquestiontest_testid_ix] on [dbo].[testquestion]([testid] asc); i tried delete parent test gives

android - how to set dialog or layouts in runnable of threads? -

i checking weather username , password present in table of db.if username , password present setting layout setcontentview(r.layout.activity_main1) , if not showing dialog message dialog.setmessage("your username , password not valid").it showing error cant set view in threads.is alternate way show layouts or have written code wrong. package com.example.loginandroid; import java.sql.connection; import java.sql.drivermanager; import java.sql.resultset; import java.sql.sqlexception; import java.sql.statement; import android.os.bundle; import android.app.activity; import android.app.alertdialog; import android.util.log; import android.view.view; import android.widget.edittext; import android.widget.toast; import android.os.looper; public class mainactivity extends activity{ string username,password; resultset rs =null; boolean temcfag=false,temqfag=true; public static string tag="lifecycle activity"; edittext user,pass; alertdial

angularjs - How to add an element and bind an event to it? -

i want make resize-directive. therefore want create new element (the resizer) , bind event it, in code event bind directive-rootelement: elm.append('<div class="iwresizable__resizer"></div>').bind('mousedown', function ($event) { startw = elm.prop('offsetwidth'); starth = elm.prop('offsetheight'); initialmousex = $event.clientx; initialmousey = $event.clienty; $document.bind('mousemove', mousemove); $document.bind('mouseup', mouseup); $event.preventdefault(); }); how can bind mousedown-event new div? here plunker if not using jquery (which don't seem to), should instantiation/binding , appending in different statements: var resizer = angular.element('<div class="myresizable__resizer"></div

JMX - addConnectionNotificationListener not handling connection close -

i trying detect shutdown of remote server using jmx connection. the approach using to create jmx connection weblogic server, and add "addconnectionnotificationlistener" connector now if server goes down, expecting notification of type "jmxconnectionnotification". this not happen. figuring out connection not valid anymore, have access (by small means) , when connection object accessed notification listener gets notification. if done way, not real-time. can point me can done solve issue? my code reference - public class printserverstate { private static mbeanserverconnection connection; private static jmxconnector connector; private static final objectname service; private jmxconnectornotificationlistener connectionlistener = null; static { try { service = new objectname( "com.bea:name=domainruntimeservice,type=weblogic.management.mbeanservers.domainruntime.domainruntimeservicembean"

ruby on rails - Authorisation through url -

say, have posts app. there's form can fill in fields title,text,email , subm button. no registration required. after form submission post should moderated. if it's approved appears in main list. after form submission , approval, user receives link(link sent user's email) editing post. -- how this? upd the question not how moderate or validate post/usr but how give him link editing post whenever user record created can generate token bound record so: in user.rb before_save :generate_token def generate_token self.token = securerandom.hex(6) end then when submitting user registration confirmation link so: link_to "validate account", validate_user_path(token: user.token) and example of userscontroller def validate user = user.find_by_token(params[:token]) if user user.update_attributes(validated: true) flash[:notice] = 'user succesfully validated.' else flash[:error] = 'couldn't find user token

css - Jquery hiding responsive navigation when increasing browser size -

i have nav bar hides when window goes below width. menu button appears. when button toggled show menu , toggled hide again , window size increased navbar stays hidden. think jquery toggle adding inline style overriding css how can stop happening? $('#responsive_nav_trigger').click(function(){ $('#top_nav').toggle('fast'); }); @media screen , (min-width: 760px) { #top_nav{ display: inline-block; } } @media screen , (max-width: 760px) { #responsive_nav_trigger{ display: block; } #top_nav{ display: none; float: left; width: 100%; clear: both; } #top_nav li{ width: 100%; height: 25px; font-size: 1em; float: left; margin: 5px 0; padding: 0; text-align: center; } } please use display: inline-block!important;

string - Extracting a .tar file and creating a filelist -

i have little code here file in *.tar.gz; tar xzvf "${file}" && rm "${file}"; done it extracts tar.gz , deletes it. have create filelist file (.fl) named substring .tar . example, have delete first 5 letters , last 5 (the extension) name of .tar.gz . , every .tar.gz extract. example: i have abc_a.tar.gz abc_a.xml in it. i have make a.fl , in a.fl have write abc_a.xml thanks in advance. in loop, can following each file: # delete first 5 characters name=${file:5} # delete .tar.gz suffix name=${file%%.tar.gz}

dictionary - python dict() initialisation -

since few weeks learning python. have background in c++, might explain question. it following python code: #!/usr/bin/python2 # -*- coding: utf-8 -*- class testa: dictionary = dict() def __init__(self): pass class testb: dictionary = none def __init__(self): self.dictionary = dict() def main(): ta1 = testa() ta2 = testa() tb1 = testb() tb2 = testb() ta1.dictionary["test1"] = 1 ta1.dictionary["test2"] = 2 ta2.dictionary["test3"] = 3 ta2.dictionary["test4"] = 4 print "testa ta1" key in ta1.dictionary.keys(): print " " + key + "\t" + str(ta1.dictionary[key]) print "testa ta2" key in ta2.dictionary.keys(): print " " + key + "\t" + str(ta2.dictionary[key]) tb1.dictionary["test1"] = 1 tb1.dictionary["test2"] = 2 tb2.dictionary["test3"]

c# - remove character like |n, |p, |q from regex -

|p,|q string expression example "what |n abc |p"? it can character after '|' i tried "[\\|.]" but no success. no need put | , . inside character class engine treat them literally. character class [\\|.] searching 1 character out of \ , | or . (literally). what want match on |. (read: character | , 1 other character after it). string strregex = @"\|."; regex myregex = new regex(strregex, regexoptions.none); string strtargetstring = @"what |n abc |p"; string strreplace = @""; return myregex.replace(strtargetstring, strreplace); every found match replaced nothing. (code taken regexhero.net )

android - Check generated ListView time -

i know how can track time spent draw/populate list view . using custom array adapter using list. thinking of using system.nanotime() . i tried following code: @override public view oncreateview(layoutinflater inflater, viewgroup container, bundle savedinstancestate) { long startnano = system.nanotime(); view view = inflater.inflate(r.layout.trip_listview, container, false); listview lv = (listview) view.findviewbyid(android.r.id.list); tripsarrayadapter tripsarrayadapter = new tripsarrayadapter(getactivity(), cacheddata.getinstance().gettripslist()); lv.setadapter(tripsarrayadapter); long endnano= system.nanotime(); system.out.println("time create: "+(endnano-startnano)); return view; } is correct way? i wouldn't rely on above code drawing not done within setadapter method. use hierarchyviewer , check how each view took draw , layout. there great article on developer website on debugging ui , there another articl

Android. Why does not work layout gravity when I define ListView's height programmatically? -

if define listview's height in xml layout gravity working, want calculate height programmatically, in case layouts sliding on 1 another. the xml: <edittext android:id="@+id/inputsearch" android:layout_width="wrap_content" android:layout_height="wrap_content" android:padding="10dp" android:hint="search..." android:background="@drawable/bar" android:inputtype="text" android:layout_gravity="top" /> <listview android:id="@+id/contactlist" android:layout_width="wrap_content" android:layout_height="400dp" android:layout_gravity="bottom" /> code: typedvalue tv = new typedvalue(); if (gettheme().resolveattribute(android.r.attr.actionbarsize, tv, true)) { actionbarheight = typedvalue.complextodimensionpixelsize(tv.data,getresources().getdisplaymetrics()); } display display = getwin

c# - Can't verify signature in JAVA but success in .NET -

we have old system using .net 3.5 (run on windows server 2003 32bits) verify e-receipts our customers (all use sha1rsa algorithm agreement). store certificates in database in base64 string. old code that: //store certificates string certificateencodebase64 = convert.tobase64string(bytearraycertificatefile); //verify signatures //hash algorithm sha-1 hashalgorithm hashalgrothm = new sha1managed(); //data byte[] data = system.text.encoding.utf8.getbytes(request.datainutf8); //signature byte[] signature = convert.frombase64string(request.signatureinbase64); //certificate x509certificate2 certificate = new x509certificate2(convert.frombase64string(certencodebase64)); //verify using algorithm rsa rsacryptoserviceprovider pubkey = (rsacryptoserviceprovider)certificate.publickey.key bool vr = pubkey.verifydata(data, hashalgrothm, signature); nothing issues except performance not good. that's why want move new system using java 1.7 (run on windows server 2012 64 bits). our ne

android - ImageView onClick opens Sliding Menu -

so have app uses buttons go different activities. below them, have imagebuttons want use 2 of them open 2 different sliding menus. have read, sliding menus here show way of using sliding menu. so code activity that: public class choosecategory extends activity { @override protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.activity_choose_category); } and xml code is: <relativelayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/drawer_layout" android:layout_width="match_parent" android:layout_height="match_parent"> <linearlayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="vertical" > <linearlayout android:layout_width="match_parent" android:layout_heig

database - ASP.NET MVC debugging best practice -

we make website debugging on remote sales_debug database instead of production remote sales one. the problem speed, using remote database local machine slow. trying install sql server express , ssms on local win 8.1 machine , found complicated. link made wondering if doing right thing. the questions are: what best configuration make website uses db debugging? maybe should use less invasive db engine same content? is local copy of db way go? or there trick speed connections remote server? thanks. you have machine in same network of your? can use local server. install ssms in machine then, sqlserver express in local server.

java - Android incoming and outgoing server setting -

i started develop email application. created screens.. got stuck on "incoming server setting screen". problem how check incoming , outgoing server setting. my code page layout is, <relativelayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="fill_parent" android:paddingleft="@dimen/activity_horizontal_margin" android:paddingright="@dimen/activity_horizontal_margin" tools:context=".incomingsetting" > <textview android:id="@+id/tvprotocol" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_alignparentleft="true" android:layout_alignparenttop="tru

configuration - Custom SimpleMembershipProvider not initialized correctly -

i have custom simplemembershipprovider implemented in application service layer. provider has of own properties inherited base classes. although overridden initialize method called on provider, , executes without exceptions, inherited properties incorrect default values such 0 or int32.maxvalue . need them initialized values provided in configuration. how can achieve this? the configuration looks this: <membership defaultprovider="abcmembershipprovider"> <providers> <clear/> <add name="abcmembershipprovider" type="abc.services.abcmembershipservices, abc.services" connectionstringname="membership" applicationname="abc" enablepasswordretrieval="false" enablepasswordreset="true" requiresquestionandanswer="false" requiresuniqueemail="true" passwordformat="hashed" maxinval

performance - Optimize jquery mobile and javascript -

im building application using phonegap , jquery mobile, , want optimize code. read place javascript faster jquery, have large impact if replace jquery code javascript? (im using both now). read should compress code, phonegap compress when building, how necessary really? i read -webkit-transform: translate3d(0,0,0); speeds performance, should use have animations? , beneficial applications on device (not web applications)? i removed click delay , moved scripts end of html page. other things have missed? update another question regarding css. im using gradient on buttons, , after read, can slow performance. below example of 1 of buttons, , question if need of attributes android , iphone on mobile application text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); background-color: #ceedf5; *background-color: #ceedf5; background-image: -moz-linear-gradient(top, #f7fbfc, #ceedf5); background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#f7fbfc), to(#ceedf5)); background-image: -w

Managing iOS and Android development of the same product -

i'm ios developer, got involved in project management recently. building app both ios , android platforms uses web backend. assuming there different teams/people working on different platform, biggest question i've got is: should ios , android development synchronised @ all? by synchronised mean timing , features. found developing 1 platform first best way, i'm eager hear other thoughts on this. i'm looking strategies/ideas/advice/experience here. , appreciate contribution finding best way manage this.

php - Yii Display data from dataprovider of 2 models -

how can display "arrendatario_nombre" using dataprovider in clistview $dataprovidercontratos = new cactivedataprovider(zfcontratos::model(), array( 'keyattribute'=>'zf_contrato_id', 'criteria'=>array( 'order' => 'contrato_fecha_ini', 'select' => 't.*, arr.arrendatario_nombre arrendatario_nombre', 'join' => 'left join zf_arrendatarios arr on arr.arrendatario_id = t.zf_arrendatarios_arrendatario_id', 'condition'=>'zf_inmuebles_inmueble_id=-1', ), )); i tried: $data->arrendatario_nombre thanks! you can use yii relations purpose, http://www.yiiframework.com/doc/guide/1.1/en/database.arr#declaring-relationship in zfcontratos model file use following , can call $data->arrendatario_nombre public function relations() { return array(