Friday, 15 June 2012

android - Why the menu items appear on the optionsMenu? -



android - Why the menu items appear on the optionsMenu? -

despite there icons associated action , have no plenty space in actionbar, appear in optionsmenu instead of appearing in overflow icon.

i inflating actionbar 5 icons each 1 has specific functionality "please refer xml file below", items have android:showasaction=never expect them implicitly reside within overflow icon on actionbar, when run app, item property android:showasaction=never instead appears in optionsmenu. why happens? , hope explained problem clearly.

update:

simply, want, if there no space icon placed on actionbar, should placed within overflow icon shown in image " icon 3 vertical dots on each other".

to note:

i using galaxy note3

why question marked duplicate. question suggested duplicate different mine? please review question again.

java_code:

public class actionbaractivitytest00 extends activity { @override protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.activity_action_bar_activity_test00); } @override public boolean oncreateoptionsmenu(menu menu) { // inflate menu; adds items action bar if present. getmenuinflater().inflate(r.menu.action_bar_activity_test00, menu); homecoming super.oncreateoptionsmenu(menu); }

xml:

<menu xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" tools:context="com.example.actionbaractivitytest.actionbaractivitytest00" > <!-- search / display --> <item android:id="@+id/action_search" android:icon="@drawable/ic_action_search" android:title="action_search" android:showasaction="ifroom"/> <!-- location found --> <item android:id="@+id/action_location_found" android:icon="@drawable/ic_action_location_found" android:title="action_location_found" android:showasaction="ifroom" /> <!-- refresh --> <item android:id="@+id/action_refresh" android:icon="@drawable/ic_action_refresh" android:title="action_refresh" android:showasaction="ifroom" /> <!-- help --> <item android:id="@+id/action_help" android:icon="@drawable/ic_launcher" android:title="action_help" android:showasaction="never"/> <!-- check updates --> <item android:id="@+id/action_check_updates" android:icon="@drawable/ic_action_refresh" android:title="action_check_updates" android:showasaction="never" />

add below property in showasaction=never menu items

android:orderincategory="2"

thats it..it shown in overflow men.. changes sample code scenario , works fine in app

<menu xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" tools:context="com.example.demo.mainactivity" > <item android:id="@+id/action_settings1" android:orderincategory="100" android:title="@string/action_settings" app:showasaction="ifroom"/> <item android:id="@+id/action_settings2" android:orderincategory="100" android:title="@string/action_settings" app:showasaction="ifroom"/> <item android:id="@+id/action_settings3" android:orderincategory="100" android:title="@string/action_settings" app:showasaction="ifroom"/> <item android:id="@+id/action_settings" android:orderincategory="100" android:title="@string/action_settings" app:showasaction="never"/> <item android:id="@+id/action_settings5" android:orderincategory="100" android:title="@string/action_settings" app:showasaction="never"/>

android android-actionbar android-actionbar-compat android-actionbaractivity

Feature detection on a small, noisy image with OpenCV -



Feature detection on a small, noisy image with OpenCV -

i have image both pretty noisy, little (the relevant portion 381 × 314) , features subtle.

the source image , cropped relevant area here well: http://imgur.com/a/o8zc2

the task count number of white-ish dots within relevant area using python happy isolating lighter dots , lines within area , removing background construction (in case cell).

with opencv i've tried histogram equalization (destroys details), finding contours (didn't work), using color ranges (too close in color?)

any suggestions or guidance on other things try? don't believe can higher res image task possible rather hard source?

(this not python answer, since never used python/opencv binding. images below created using mathematica. used basic image processing functions, should able implement in python on own.)

a general "trick" in image processing think removing thing you're looking for, instead of looking it. because often, removing much easier finding it. instance apply morphological opening, median filter or gaussian filter it:

these filters remove details smaller filter size, , leave coarser structures more or less untouched. can take difference original image , local maxima:

(you'll have play around different "detail removal filters" , filter sizes. there's no way tell 1 works best 1 image.)

opencv image-processing image-recognition edge-detection noise-reduction

Java enum fields serialization/deserialization -



Java enum fields serialization/deserialization -

intro

i using apache storm (local mode, not remote mode) in java project , when creating topology need pass object 1 of bolts

topologybuilder builder = new topologybuilder(); ..... builder.setbolt("last-bolt", new mybolt(classifier.seconds)).somegrouping(...); ..... localcluster cluster = new localcluster(); cluster.submittopology("test", conf, builder.createtopology());

the object has non-serializable fields. instead of subclassing classes fields belong , making them serializable have taken approach. since actual object isn't gonna changing lot , can enumerated i've decided create enum , pass bolt's tasks. thing enum is serializable under costs. approach works in local mode because (if understood storm correctly) there 1 jvm running on computer , things can't complicated actually.

question

if enum consists of static final non-serializable field field constructed when enum deserialized process on different machine or cluster running multiple jvms?

the actual enum (static final field @ end)

public enum classifier { seconds { public string classify(string timestamp) { datetime datetime = formatter.parsedatetime(timestamp); int sec = datetime.getsecondofminute(); if (second <= 30) { homecoming "00 - 30"; } else { homecoming "30 - 60"; } } public int getnumberofcategories() { homecoming 2; } }, week { public string classify(string timestamp) { datetime datetime = formatter.parsedatetime(timestamp); int dayofweek = datetime.getdayofweek(); string typeofday = (dayofweek >= 1 && dayofweek <= 5) ? "workday" : "weekend"; int hr = datetime.gethourofday(); string hourinterval = hr + " - " + (hour == 23 ? 0 : hr + 1); homecoming typeofday + " " + hourinterval; } public int getnumberofcategories() { homecoming 48; } }; private static final datetimeformatter formatter = datetimeformat.forpattern("yyyy-mm-dd hh:mm:ss"); public abstract string classify(string timestamp); public abstract int getnumberofcategories(); }

more details

datetimeformatter , datetime org.joda.time package.

all static final fields initialized when class loaded. whatever serialization mechanism used first initialize static fields , execute static initialization blocks. note static fields not deserialised because not deserialising classes objects (please refer reply http://stackoverflow.com/a/6429497/1937263).

so reply yes, field should constructed properly.

java serialization static enums apache-storm

c# - Cannot implicitly convert type 'System.Collections.Generic.List' to 'FarseerPhysics.Dynamics.Fixture' -



c# - Cannot implicitly convert type 'System.Collections.Generic.List' to 'FarseerPhysics.Dynamics.Fixture' -

i error message in line when seek attach fixture body.

fixture newfixture = fixturefactory.attachcompoundpolygon(list, 1.0f, testbody);

cannot implicitly convert type 'system.collections.generic.list' 'farseerphysics.dynamics.fixture'

how can create fixture , attach body? possible attach more 1 fixture body?

the rest of code:

list<vertices> list = new list<vertices>(); vector2 _origin; float _scale; uint[] info = new uint[sprite.width * sprite.height]; sprite.getdata(data); vertices texturevertices = polygontools.createpolygon(data, sprite.width, false); vector2 centroid = -texturevertices.getcentroid(); texturevertices.translate(ref centroid); _origin = -centroid; texturevertices = simplifytools.reducebydistance(texturevertices, 4f); list = triangulate.convexpartition(texturevertices, triangulationalgorithm.bayazit); _scale = 1f; vector2 vertscale = new vector2(convertunits.tosimunits(1)) * _scale; foreach (vertices vertices in list) { vertices.scale(ref vertscale); }

fixture newfixture = fixturefactory.attachcompoundpolygon(list, 1.0f, testbody);

this line of code returns list<fixture> here method signature fixturefactory source code.

public static list<fixture> attachcompoundpolygon(list<vertices> list, float density, body body)

so you're getting list<fixture> back. if want first item in list (which might case, since you're assuming there'd one),

fixture newfixture = fixturefactory.attachcompoundpolygon(list, 1.0f, testbody).first();

c# farseer

I can't find what's wrong with my javascript-ajax-php "upload file" code -



I can't find what's wrong with my javascript-ajax-php "upload file" code -

this first question here (usually find own ways solve problems) can't find problem in file upload code. it's supposed utilize ajax. simplified easier read. here html form:

<form id="fileform" enctype="multipart/form-data" method="post" action="php/uploadfile.php"> <p>insert file: <input type="file" id="fileup" name="fileup" /> <button type="submit" id="uploadbutton" onclick="sendfile();">upload</button></p> </form>

now here goes javascript sendfile() function:

function sendfile() { var forma = document.getelementbyid("fileform"); var failas = document.getelementbyid("fileup"); var uploadbutton = document.getelementbyid("uploadbutton"); forma.onsubmit = function(event) { event.preventdefault(); } uploadbutton.innerhtml = "uploading, please wait!"; var newfile = failas.files[0]; var formdata = new formdata(forma); formdata.append("fileup", newfile, newfile.name); alert(newfile.name);// here says filename.jpg means ok @ stage xmlhttp = new xmlhttprequest(); xmlhttp.onreadystatechange = function() { if(xmlhttp.readystate == 4 && xmlhttp.status == 200) { alert (xmlhttp.responsetext); } } xmlhttp.open("post", "php/uploadfile.php", true); xmlhttp.setrequestheader("content-type","application/x-www-form-urlencoded"); xmlhttp.send(formdata); }

and php:

<?php echo var_dump($_files); ?>

it should alert contents of $_files, says array(0){} if seek $_request. so, if suggest may wrong, appreciated :]

javascript php html ajax

xaml - wpf How to set xctk:ColorPicker default color -



xaml - wpf How to set xctk:ColorPicker default color -

edit: managed prepare problem, doing binding value.color instead of binding color, set. help anyway!

i'm making gui has xctk:colorpicker in xaml:

<gridviewcolumn.celltemplate> <datatemplate> <xctk:colorpicker selectedcolor="{binding value.color}" width="40"/> </datatemplate> </gridviewcolumn.celltemplate>

currently, default color of selector blue, alter black. how accomplish this?

the color picker shows default color binded property value

so in case if property value.color homecoming bluish blue

so changing property color black alter black

but in case if not want alter property value create utilize of placeholder property default value of black , update source when changes

example placeholder approach

<grid background="{binding value}"> <xctk:colorpicker selectedcolor="{binding placeholder}" width="40" verticalalignment="center"/> </grid>

view model

class="lang-cs prettyprint-override">bool isdefault = true; public color placeholder { { if (isdefault) homecoming colors.black; homecoming value.color; } set { value.color = value; isdefault = false; } } public solidcolorbrush value { get; set; }

in above illustration assumed value of type solidcolorbrush, , initialized value = new solidcolorbrush(colors.green);

wpf xaml wpftoolkit

Android: Compile APK without debug symbols -



Android: Compile APK without debug symbols -

i stumbled upon android apk decompiler, can recreate original source code accurately.

i believe there must kind of debug symbols introduced when compiling (ala gcc's -g flag), enables tool decompile source code.

can disable symbols? if not, how can obfuscate source code cannot decompiled way?

you utilize proguard. won't disallow decompilation create harder.

the proguard tool shrinks, optimizes, , obfuscates code removing unused code , renaming classes, fields, , methods semantically obscure names. result smaller sized .apk file more hard reverse engineer. because proguard makes application harder reverse engineer, of import utilize when application utilizes features sensitive security when licensing applications.

proguard integrated android build system, not have invoke manually. proguard runs when build application in release mode, not have deal obfuscated code when build application in debug mode. having proguard run optional, highly recommended.

android

windows 8.1 - Could not find SDK Bing.Maps.Xaml, Version=1.113.0601.1 -



windows 8.1 - Could not find SDK Bing.Maps.Xaml, Version=1.113.0601.1 -

i working windows 8.1 store app.in app using bing map sdk. have added bing map sdk extention.but got error "could not find sdk bing.maps.xaml, version=1.113.0601.1".please give suggestion.

the version of bing maps referencing windows 8 only. there new version windows 8.1. new version has additional features , lot of bug fixes. can find windows 8.1 bing maps command here: http://visualstudiogallery.msdn.microsoft.com/224eb93a-ebc4-46ba-9be7-90ee777ad9e1

windows-8.1 bing-maps

javascript - How can Modernizr load a (Modernizr)class conditionally with css? -



javascript - How can Modernizr load a (Modernizr)class conditionally with css? -

i checking how css expressions modernizr classes work.. , see on google dev. tools below:

//normal css .box{ width:100px; height:100px; border-radius:20px; background:blue; //as modernizr detects no support.. .no-borderradius .box{ background:url(radiusyimage.png); }

'radiusyimage' not add together http request.. know possible(load source necessary) js:

if (!modernizr.borderradius) { //load img or pollyfill.. }

but how possible css? how work actually?

current browsers don't request images won't utilize in html see question.

since modernizr add together no-borderradius class if browser doesn't back upwards attribute, modern browser won't have dom element matching .no-borderradius .box therefore, image not load.

the drawback here have few more lines of styles in css, impact unnoticeable.

javascript css modernizr

Insert ID into SQL from C# Combo box -



Insert ID into SQL from C# Combo box -

i have dropdown(combo) box in c# programme i'm writing. -it pulls through info table in database:

application_id | application ---------------|-------------- 1 |name1 2 |name2 3 |name3

the code dropdown box looks this:

sqlconnection conn = new sqlconnection(sqlcon.dbcon); conn.open(); sqlcommand sc = new sqlcommand("select * application", conn); sqldatareader reader; reader = sc.executereader(); datatable dt = new datatable(); dt.columns.add("applicationid", typeof(int)); dt.columns.add("application_name", typeof(string)); dt.load(reader); app.valuemember = "applicationid"; app.displaymember = "application_name"; app.datasource = dt; conn.close();

basically, user selects name of application , presses 'insert' button. want post relating id of application table in database. (accounts table). -i did have setup primary-foreign key relationship test removed relationship.

my code inserting database this:

sqlconnection conn = new sqlconnection(sqlcon.dbcon); conn.open(); using (sqlcommand aquery = conn.createcommand()) { aquery.commandtext = "insert accounts(accountname,application_id,num_users) values(@param1,@param2,@param3)"; aquery.parameters.add(new sqlparameter("@param1", account.text)); aquery.parameters.add(new sqlparameter("@param2", app.valuemember)); aquery.parameters.add(new sqlparameter("@param3", users.text)); aquery.executenonquery(); }

my issue, i'm getting exception occur when press insert. (everything compiles)

the exception states:

error conversion failed when converting nvarchar value 'applicationid' info type int.

-i have tried: cast convert

converting valuemember int in app before insert statement, still same error.

what doing wrong? -its not trying convert actual string 'valuemember' int it??

i think need selectedvalue retrieve selected value combo box, so:

app.selectedvalue

selectedvalue property: gets or sets value of fellow member property specified valuemember property.

you can set breakpoint on retrieving value check returned create sure number.

c# sql sql-server sql-insert

javascript - How to use Ember's getters/setters on properties with dots? -



javascript - How to use Ember's getters/setters on properties with dots? -

in webapp, have model properties names dynamically generated based on info server. example, reference doing controller:

var str1 = 'property.name.with.dots'; // string server this.get('model.someproperty')[str1].integer = 2; this.get('model.someproperty')[str1].integer += 1;

but ember doesn't - says should utilize set or get function. makes sense. want in place of lastly line above:

this.get('model.someproperty.' + str1).incrementproperty('integer');

this work fine out of box if str1 didn't have dots. does, though, can ember's getters work? tried

this.get('model.someproperty')[str1].incrementproperty('integer');

but doesn't work - subobjects don't ember's methods default.

definitely

massage info before handing off ember, having dots in name cause plethora of chaining problems.

clean data, chose _ (this isn't deep cleaning, exercise fun) app.cleandata = function(result){ var response = {}, re = new regexp('\\.', 'g'), newkey; for(var key in result){ newkey = key.replace(re, '_'); response[newkey] = result[key]; } homecoming response; }; use cleaned info instead of server data app.fooroute = em.route.extend({ model: function(){ homecoming $.getjson('/foo').then(function(result){ homecoming app.cleandata(result); } } });

javascript ember.js

extjs - Cannot get the object of a tabpanel -



extjs - Cannot get the object of a tabpanel -

i have grid in center part of border layout. when specific item clicked in grid, need alter center part display tab panel. having problem getting tabpanel object.

in ctrlpanel file, on grid listener, using componentquery tabpanel('ccmain') object. returns undefined.

i using componentquery 'ccmain' in centerpanel file(lays out center region) successfully, when moved code ctrlpanel file(one of items in centerpanel) fails. componentquery no longer returns tabpanel 'ccmain'. componentquery homecoming centerpanel or viewport. attemped centerpanel or viewport.down find 'ccmain', returns undefined. if can tell me how tabpanel or doing wrong, appreciate it. time.

ctrlpanel.js

ext.define('servcsol.view.ctrlpanel',{ extend: 'ext.panel', alias: 'widget.ctrlpanel', xtype: 'ctrlpanel', itemid: 'ctrlpanel', requires:[ 'servcsol.store.facilitystore' ], initcomponent: function () { var me = this; ext.applyif(me, { items: [ { xtype: 'panel', height: 750, title: 'control panel', items: [ { xtype: 'gridpanel', padding: '20 20 5 20', store: 'workhistorystore', height: 590, width: '100%', border: true, columns: [ { width: 110, dataindex: 'wrkhistdate', text: 'due date' }, { width: 100, dataindex: 'wrktype', text: 'work type' } ], listeners : { itemclick: function(dv, record, item, index, e) { if(record.get('wrktype') == 'test') { var tabpanel = ext.componentquery.query('ccmain')[0]; console.log('tabpanel is: ', tabpanel); var tabindex = tabpanel.items.findindex('id', 'hazard'); var center = ext.componentquery.query('centerpanel')[0]; center.getlayout().setactivetab(tabindex); }

ccmain.js

ext.define('servcsol.view.ccmain', { extend: 'ext.tab.panel', itemid: 'ccmain', alias: 'widget.ccmain', xtype: 'ccmain', initcomponent: function () { var me = this; ext.applyif(me, { items: [ { xtype: 'facility' }, { xtype: 'hazlisting' }, { xtype: 'hazard' }, { xtype: 'testformrp' }, { xtype: 'testformdc' } ] }); this.callparent(arguments); } });

one of reasons can ccmain not instantiated instantiated components can found componentquery.query. then, if ccmain found cannot set active item way. easiest assign tabs itemids , phone call setactivetab:

tabpanel.setactivetab(itemidofthetab)

extjs extjs4

logging - Zimbra Java configuration to send email and loggging -



logging - Zimbra Java configuration to send email and loggging -

i looking code allow me send email via java zimbra soap api.

my initial though utilize apache-cxf , convert wsdl file java files. able that. now, have corresponding functions available well.

now, want send email using zimbra server. after searching on internet, still not able find article. have configured zimbra server on 1 of machine. how configure utilize machine ip address or domain send email via zimbra soap api?

can guide me how send email using java zimbra server? else need logs of email? e.g, want logs regarding email delivery, weather delivered, deffered, or bounce backed?

any api available logs? or there physical location zimbra write logs?

i have looked @ rest api, not useful either. using zcs 8.0.7.

what else need logs of email? e.g, want logs regarding email delivery, weather delivered, deffered, or bounce backed?

found under /var/log/zimbra.log.

for farther details please see; http://wiki.zimbra.com/wiki/ajcody-logging#the_bread_and_butter_logs

there plenty info on zcs 8.0.7 including admin guides/release notes zimbra wikis/forums.

java logging soap email-client zimbra

android - Invalid syntax zipfile(apkAbsPath) in line 202 ninjadroid.py -



android - Invalid syntax zipfile(apkAbsPath) in line 202 ninjadroid.py -

i cloned ninjadroid https://github.com/rovellipaolo/ninjadroid , followed instructions decompiling apk files. instructed have installed android sdk , python, when tried running command in command prompt (python ninjadroid.py -t mypackage.apk), throws below error

file "ninjadroid.py", line 202 zipfile(apkabspath) z:

mmm... that's strange.

is 'mypackage.apk' existing file (in computer)? real apk package? error, trying reverse non-apk file.

unfortunately "is-apk" check in current, available version lazy check - done pretty badly. reimplemented in new version working on.

update

with newest ninjadroid version (i.e. 2.0):

$ python ninjadroid.py this_is_a_non_existing_file >> ninjadroid: [error] target file (i.e. 'this_is_a_non_existing_file') must existing, readable file! $ touch this_is_an_existing_file_but_not_an_apk_package.txt $ python ninjadroid.py this_is_an_existing_file_but_not_an_apk_package.txt >> ninjadroid: [error] target file (i.e. 'this_is_an_existing_file_but_not_an_apk_package.txt') must apk package! $ python ninjadroid.py test/data/example.apk { "app_name": "example", ... }

android python

gmail - How to Disable Pop and Imap? -



gmail - How to Disable Pop and Imap? -

i've googled lot couldn't find answer. need disable pop , imap gmail. how can disable gmail pop , imap?

gmail gmail-imap gmail-pop

MySQL operators' precision on double -



MySQL operators' precision on double -

i'm trying store currency value in mysql (innodb) , need write queries aggregate records (sum) , i'm having problem precision of the output!

i've set field's type double , values precise mysql's operators not precise need. worth, php's default operators not precise plenty either there's bc* functions in php can trick.

i wondering if there's way tune precision of mysql operators? including aggregation functions?

for record, storing , retrieving mysql won't impact values means double ideal type fields.

since money needs exact representation don't utilize info types approximate double floating-point. can utilize fixed-point numeric info type like

numeric(15,2) 15 precision (total length of value including decimal places) 2 number of digits after decimal point

see mysql numeric types:

these types used when of import preserve exact precision, illustration monetary data.

mysql precision

android - I see “You must have AdActivity declared in AndroidManifest.xml with configChanges.” after resigning apk -



android - I see “You must have AdActivity declared in AndroidManifest.xml with configChanges.” after resigning apk -

i have apk. need alter sprites in apk , logo.

i first decompile apk send using: apktool.bat d -s -f "sracer.apk" then alter logos , auto sprite. then rebuild apk using apktool.bat , parameter b. then sign apk using jarsigner , keystore file then use: zipalign.exe -v 4 sracer.apk

i check signing using jarsigner , says correct.

but admob ads don't work.

i checked androidmanifest of compiled apk , has configchanges , adactivity in xml.

i don't know going wrong because instead of ads see "you must have adactivity declared in androidmanifest.xml configchanges" activity declared, i'm sure.

here manifest (after compiled , signed):

<?xml version="1.0" encoding="utf-8"?> <manifest android:versioncode="3" android:versionname="1.2" android:installlocation="auto" package="com.androidapps.sracer" xmlns:android="http://schemas.android.com/apk/res/android"> <uses-sdk android:minsdkversion="8" android:targetsdkversion="15" /> <uses-permission android:name="android.permission.write_internal_storage" /> <uses-permission android:name="android.permission.read_internal_storage" /> <uses-permission android:name="android.permission.write_external_storage" /> <uses-permission android:name="android.permission.read_external_storage" /> <uses-permission android:name="android.permission.access_network_state" /> <uses-permission android:name="android.permission.internet" /> <application android:theme="@style/apptheme" android:label="@string/app_name" android:icon="@drawable/ic_launcher"> <activity android:label="@string/app_name" android:name="com.androidapps.sracer.mainmenuactivity" android:configchanges="orientation"> <intent-filter> <action android:name="android.intent.action.main" /> <category android:name="android.intent.category.launcher" /> </intent-filter> </activity> <activity android:label="@string/app_name" android:name="com.androidapps.sracer.levelselectactivity" android:configchanges="orientation"> <intent-filter> <action android:name="android.intent.action.main" /> <category android:name="android.intent.category.alternative" /> </intent-filter> </activity> <activity android:label="@string/app_name" android:name="com.androidapps.sracer.recordsmenuactivity" android:configchanges="orientation"> <intent-filter> <action android:name="android.intent.action.main" /> <category android:name="android.intent.category.alternative" /> </intent-filter> </activity> <activity android:label="@string/app_name" android:name="com.androidapps.sracer.helpmenuactivity" android:configchanges="orientation"> <intent-filter> <action android:name="android.intent.action.main" /> <category android:name="android.intent.category.alternative" /> </intent-filter> </activity> <activity android:label="@string/app_name" android:name="com.androidapps.sracer.preloaderactivity" android:configchanges="orientation"> <intent-filter> <action android:name="android.intent.action.main" /> <category android:name="android.intent.category.alternative" /> </intent-filter> </activity> <activity android:label="@string/app_name" android:name="com.androidapps.sracer.gameplayactivity" android:configchanges="orientation"> <intent-filter> <action android:name="android.intent.action.main" /> <category android:name="android.intent.category.alternative" /> </intent-filter> </activity> <activity android:name="com.google.ads.adactivity" android:configchanges="keyboard|keyboardhidden|orientation|screenlayout|uimode" /> </application> </manifest>

the problem see is, haven´t declared finish attributes configchanges. also, need set sdk version maybe higher level, because older versions don´t back upwards attributes (if remeber correctly, api 13 needed). configchanges should this:

<activity android:name="com.google.ads.adactivity" android:configchanges="keyboard|keyboardhidden|orientation|screenlayout|uimode|screensize|smallestscreensize"/>

the attributes case sensitive, sure set them correctly.

android xml apk jarsigner

c# - Any way to constrain a generic interface to the type that implements it? -



c# - Any way to constrain a generic interface to the type that implements it? -

public interface icloneable<t> { t clone(); } public foo: icloneable<foo> { public foo clone() { //blah } }

is there way constrain t type implements interface? (foo in case). nice enforce implementing icloneable homecoming instance of itself, , not random type fancies.

no, basically. can't generic constraints. also, can't stop them implementing interface multiple times different t (as long t satisfy where constraints, none in case).

there no where constraint allows restriction implementing type.

you kinda sorta can method parameter restriction, isn't satisfactory:

public static t superclone<t>(this t original) t : icloneable<t> {...}

c# generics interface generic-constraints

Android Fragments - newInstance vs instantiate method -



Android Fragments - newInstance vs instantiate method -

are there (dis-)advantages utilize instantiate method loading new fragments? or on personal taste?

bundle args = new bundle(); args.pustring(...); args.... fragment newfragment = fragment.instantiate(this, fragmentname, args);

vs

//... newfragment instance = newfragment.newinstance(string param1, string param2); //.... public static newfragment newinstance(string param1, string param2) { newfragment fragment = new newfragment(); bundle args = new bundle(); args.putstring(arg_param1, param1); args.putstring(arg_param2, param2); fragment.setarguments(args); homecoming fragment; }

using newinstance() preferable if have arguments must provided fragment, it's easy see parameters needed, , don't have worry creating bundle , knowing keys use.

if fragment takes no arguments, avoid altogether , create default constructor, i.e. new myfragment().

android android-fragments

javascript - Connecting to MongoDB over SSL with Node.js -



javascript - Connecting to MongoDB over SSL with Node.js -

how connect mongodb-server on ssl using node.js?

i've read sources of few drivers (mongojs, mongodb-native) , i've been googling while now, can't seem find proper tutorials, guides or docs.

as suggested in comments, node-mongodb-native has needed.

i got , running using following:

var mongo = require('mongodb'); var server = new mongo.server('hostname', 27017, { ssl: true }); var db = new mongo.db('name_of_my_db', server, { w: 1 }); var auth = { user: 'username', pass: 'password' }; db.open(function(err, db) { if (err) homecoming console.log("error opening", err); db.authenticate(auth.user, auth.pass, function(err, result) { if (err) homecoming console.log("error authenticating", err); console.log("authed?", result); db.collection('whatever').count(function(err, count) { if (err) homecoming console.log("error counting", err); console.log("count", count); db.close() }); }); });

edit

you can ssl mongoose:

mongoose.createconnection(connstring, { server: { ssl: true }})

javascript node.js mongodb ssl

ruby on rails - Testing controller with rspec 3 gives "@routes is nil" -



ruby on rails - Testing controller with rspec 3 gives "@routes is nil" -

after upgrade rails app utilize rspec 3, controllers tests broke. missing in rails_helper.rb?

rails_helper.rb

env["rails_env"] ||= 'test' require 'spec_helper' require file.expand_path("../../config/environment", __file__) require 'rspec/rails' dir[rails.root.join("spec/support/**/*.rb")].each { |file| require file } dir[rails.root.join("spec/factories/*.rb")].each { |file| require file } activerecord::migration.check_pending! if defined?(activerecord::migration) rspec.configure |config| config.fixture_path = "#{::rails.root}/spec/fixtures" config.use_transactional_fixtures = true config.infer_base_class_for_anonymous_controllers = false config.order = "random" config.include applicationhelper config.include factorygirl::syntax::methods config.include actioncontroller::testcase::behavior config.include devise::testhelpers, type: :controller config.extend controllermacros, type: :controller config.include(mailermacros) config.before(:each) { reset_email } end

users_controller_spec.eb

require 'rails_helper' describe userscontroller describe 'has_user' let(:student) { factorygirl.create(:student) } 'not succeeds password' :has_user, { password: 123 } expect(response).to have_http_status(:unprocessable_entity) end end end

failures:

1) userscontroller has_user not succeeds password failure/error: :has_user, { password: 123 } runtimeerror: @routes nil: create sure set in test's setup method. # ./spec/controllers/users_controller_spec.rb:10:in `block (3 levels) in <top (required)>'

thanks!

well, missing line within rails_helper.rb documented here

config.infer_spec_type_from_file_location!

ruby-on-rails rspec rspec3

apache spark - How to build deb package to contain single assembly jar with sbt-assembly and sbt-native-packager? -



apache spark - How to build deb package to contain single assembly jar with sbt-assembly and sbt-native-packager? -

is possible utilize sbt-assembly , sbt-native-packager plugins create java application archetype installation instead of having project jar , dependencies in <app>/lib contains assembly jar?

i've built spark application , want add together assembly context rather adding each jar individually.

edit: need build deb packages deployment. want deb bundle contain assembly not project & dependent jars.

the filesystem layout should be

<install_dir> bin appname conf application.conf lib appname-assembly.jar

sbt-native-packager adds symlink /usr/bin convenient not necessary.

this possible native package. total illustration can found on github have alter mappings , scriptclasspath

your build.sbt should contain next parts

// assembly settings assemblysettings // specify name our fat jar jarname in assembly := "assembly-project.jar" // using java server application packagearchetype.java_server maintainer in linux := "nepomuk seiler <nepomuk.seiler@mukis.de>" packagesummary in linux := "custom application configuration" packagedescription := "custom application configuration" // removes jar mappings in universal , appends fat jar mappings in universal := { // universalmappings: seq[(file,string)] val universalmappings = (mappings in universal).value val fatjar = (assembly in compile).value // removing means filtering val filtered = universalmappings filter { case (file, name) => ! name.endswith(".jar") } // add together fat jar filtered :+ (fatjar -> ("lib/" + fatjar.getname))

sbt apache-spark sbt-native-packager sbt-assembly

lua - corona sdk xScale in transition.to -



lua - corona sdk xScale in transition.to -

how create object big xscale in transition.to period of time line code

transition.to(object, {time = 200, radius = 3, alpha = 1, xscale = 1.4, yscale = 1})

let's want happen 5 seconds homecoming default size xscale =1 , yscale = 1.

you can utilize delay parameter begin sec transition after x miliseconds. @ docs: http://docs.coronalabs.com/api/library/transition/to.html

transition.to(object,{time=200,radius=3,alpha=1,xscale=1.4,yscale=1}) transition.to(object,{time=200,radius=3,alpha=1,xscale=1,yscale=1, delay=5000})

lua corona xscale

text editor - Bold syntax around single character in Redmine -



text editor - Bold syntax around single character in Redmine -

in redmine's text editor, create word bold have surround asterisk * *this*. question how create 1 character bold? *t*his not seem work.

if you're using textile text formatter in redmine way accomplish seems isolating character white spaces this: bla *a* bla. couldn't find way in textile.

if utilize markdown formatter in redmine it's possible create single character bold anywhere in text this: bla**b**la.

you can select "text formatting" in "administration" - "settings" on "general" tab. careful because changing formatting after while needs migration job stated under "text formatting" box: "for migrating saved texts textile html utilize application command line: "bundle exec rake easyproject:textile:migrate_all rails_env=production"

ps: warning seems specific our redmine plugin called "easyredmine". different or nonexistent on raw redmine installation.

character text-editor redmine text-formatting

jquery - Form ajax call to PHP page not working -



jquery - Form ajax call to PHP page not working -

all of other questions similar pretty specific asker's particular situation thought i'd inquire mine.

i'm trying send form it's action page using ajax reason page still refreshes when form submitted. ideas why?

form:

<form name='comment_form' id='comment_form' action='leave_comments.php' onsubmit='return validateform()'> <input type='text' name='user_comment' class='user_comment' placeholder='leave comment...'> <input type='hidden' name='hidden_folder' value='$random_directory'> <input type='hidden' name='hidden_title' value='$title'> <input type='hidden' name='hidden_name' value='$image_name'> <input type='hidden' name='hidden_image' value='$image_info'> <input type='hidden' name='hidden_user' value='$posted_by'> <input type='submit' class='leave_comment button' name='leave_comment button' value='comment'> </form>

the js validation:

<script> function validateform() { var o=document.forms["leave_comments_form"]["user_comment"].value; if (o==null || o=="") { alert("error 2591 : whoops, looks forgot leave comment!"); homecoming false; } } </script>

the js ajax:

<script> $("#comment_form").submit(function(e) { e.preventdefault(); if (validateform()) { var form = jquery("#comment_form"); $.ajax({ type: "get", url: form.attr("action"), data: form.serialize(), success: function() {} }); } }); </script>

i'm trying form submit without page refresh.

validateform() needs homecoming true when validation successful:

function validateform() { var o=document.forms["leave_comments_form"]["user_comment"].value; if (o==null || o=="") { alert("error 2591 : whoops, looks forgot leave comment!"); homecoming false; } homecoming true; }

this isn't needed onsubmit attribute, needed when write if (validateform()), because undefined falsy.

jquery form-submit

c# - DbUpdateException when seeding data -



c# - DbUpdateException when seeding data -

i'm trying populate code first database admin user business relationship myself can access system.

to this, i'm calling seed method in global.asax file following:

public void seed() { if (!roles.any()) { list<role> roles = new list<role> { new role { rolename = "admin" }, new role { rolename = "user" } }; foreach (role r in roles) { roles.add(r); } savechanges(); } if (!users.any()) { user u = new user(); u.emailaddress = "my@email.address"; u.username = "ortund"; u.password = hashing.createhash("p455w0rd"); u.role = roles.single(r => r.rolename == "admin"); users.add(u); savechanges(); } }

user , role defined follows:

namespace logan.web.objects { public class user : loganbaseobject<user> { public string username { get; set; } public string emailaddress { get; set; } public string password { get; set; } public string biography { get; set; } public virtual role role { get; set; } public virtual icollection<article> articles { get; set; } public user() { username = string.empty; emailaddress = string.empty; password = string.empty; biography = string.empty; articles = new list<article>(); } } } public class role : loganbaseobject<role> { public string rolename { get; set; } public virtual icollection<user> users { get; set; } public role() { rolename = string.empty; users = new list<user>(); } } } namespace logan.web.dbcontext { public class roledbcontext : logandbbaseobject<role> { private static webdbcontext db = new webdbcontext(); public roledbcontext() : base() { property(p => p.rolename) .hascolumnname("srolename") .isrequired(); hasmany(m => m.users) .withrequired(); totable("roles"); } } public class userdbcontext : logandbbaseobject<user> { private static webdbcontext db = new webdbcontext(); public userdbcontext() : base() { property(p => p.username) .hascolumnname("susername") .hasmaxlength(20) .isrequired(); property(p => p.emailaddress) .hascolumnname("semailaddress") .hasmaxlength(200) .isrequired(); property(p => p.password) .hascolumnname("spassword") .hasmaxlength(255) .isrequired(); property(p => p.biography) .hascolumnname("sbiography") .hascolumntype("text"); hasrequired(r => r.role) .withmany(m => m.users) .map(x => x.mapkey("fkroleid")) .willcascadeondelete(false); property(p => p.createdate) .hascolumntype("datetime"); totable("users"); } } }

when seed method above gets savechanges(), next error:

an error occurred while saving entities not expose foreign key properties relationships. entityentries property homecoming null because single entity cannot identified source of exception. handling of exceptions while saving can made easier exposing foreign key properties in entity types. see innerexception details.

obviously has relationships beingness constructed here, don't know i'm doing wrong.

can recommend solution and/or explain problem here?

thanks in advance!

edit

here's screenshot of construction genergated. pkey field added loganbaseobject<t>:

i need larn include absolutely info tables.

i had datetime columns in user table wasn't supplying values in seed method. see here:

public class user : loganbaseobject<user> { public string username { get; set; } public string emailaddress { get; set; } public string password { get; set; } public string biography { get; set; } public virtual role role { get; set; } public bool passwordreset { get; set; } public string passwordresetkey { get; set; } public datetime resetexpiry { get; set; } public string createdby { get; set; } public datetime createdate { get; set; } }

i still don't why missing values produce error foreign keys, supplying values in seed method fixed problem.

c# entity-framework code-first

ios - Perfect alignment of triangles with Quartz2D drawing -



ios - Perfect alignment of triangles with Quartz2D drawing -

i want draw 2 general triangles in 2d space in such way share 1 edge, using quartz2d. i'm using code drawing:

- (void)drawrect:(cgrect)rect { cgcontextref context = uigraphicsgetcurrentcontext(); triangle *t1 = [triangles objectatindex:0]; triangle *t2 = [triangles objectatindex:1]; [self filltriangle:t1 incontext:context]; [self filltriangle:t2 incontext:context]; } - (void) filltriangle:(triangle *)t incontext:(cgcontextref)ctx { cgcontextmovetopoint(ctx, t.p1.p.x, t.p1.p.y); cgcontextaddlinetopoint(ctx, t.p2.p.x, t.p2.p.y); cgcontextaddlinetopoint(ctx, t.p3.p.x, t.p3.p.y); cgcontextaddlinetopoint(ctx, t.p1.p.x, t.p1.p.y); cgcontextsetfillcolorwithcolor(ctx, t.color.cgcolor); cgcontextfillpath(ctx); }

where triangle nsobject subclass holding 3 points , color.

the problem when share 2 points, there's "space" between them when fill them code, shown in image:

question: knows how rid of space there's seamless transition 1 triangle no line or whatever between them? i'd maintain using quartz2d i'm glad help. thanks!

edit: there answers showing problem caused sub-pixel anti-aliasing, , adding line

cgcontextsetallowsantialiasing(ctx, no);

to filltriangle method solved that. it's not result i'd see - don't beingness aliased, shown in sec picture.

question updated: know, how solve both of problems, is, keeping image clean no ugly aliasing no space between triangles?

edit2: so, pointed in answer, add together line stroke code, remove antialiasing flag , stroke fill space. here's lastly image show happened:

notice lines overlapping outside of box. wondering cause might have been, , disappeared when set width 0.5f (since retina, translates 1px , that's responder thought), , solved whole thing. help!

the problem drawing using antialiasing. disable context via

cgcontextsetshouldantialias(context, no);

and should fine.

edit: in case of antialiasing needed (your updated multicolor example), seek not fill triangles stroke border in same color line width of 1px:

cgcontextsetlinewidth(ctx, 0.5f); cgcontextdrawpath(ctx, kcgpathfillstroke);

of course of study should remove cgcontextsetshouldantialias line in case. it's simple solution may not best performance wise, since path has stroked , filled.

ios drawing quartz-2d

gruntjs - grunt-contrib-cssmin missing _stream_transform module -



gruntjs - grunt-contrib-cssmin missing _stream_transform module -

i next error when trying run css minification gruntjs , have no clue why.

loading "cssmin.js" tasks...error >> error: cannot find module '_stream_transform

what origin of error message? i've search through cssmin.js file , can't find single reference module.

i've same problem. go grunt-contrib-cssmin/node_modules/maxmin/node_modules/gzip-size/node_modules/browserify-zlib , install readable-stream module

npm install readable-stream

then modify file grunt-contrib-cssmin/node_modules/maxmin/node_modules/gzip-size/node_modules/browserify-zlib/src/index.js

replace:

var transform = require('_stream_transform');

by:

var transform = require('readable-stream').transform;

it works me , hope help you.

gruntjs grunt-contrib-cssmin

javascript - Get click event within slidejs pagination -



javascript - Get click event within slidejs pagination -

i have slidejs slide show uses 3 images, when click on image changes text in slide container.

example code:

<a href="#"> <div class="col-md-12"> <div class="quote"> <img class="img-responsive" src="<?php echo $al_options['al_conimg'] ?>" alt="quote"/> <p class="profile_text"><?php echo $al_options['al_scon'] ?> <br /> <a href="<?php echo $al_options['al_teamct1_url1']; ?><?php echo $al_options['al_teamct1_url_element']; ?>">more info</a> </div> </div> </a>

notice href='#'" tags. need add together button or link open url. jquery or js ok. when add together href seek ignored, , click picking http://url.com/#. there away have href within href open page?

javascript jquery slidesjs

How to make this table scrollable and header fixed Bootstrap -



How to make this table scrollable and header fixed Bootstrap -

hello have tried various implementation of bootstrap fixed header , body scroll nil worked out me.can help how done.

jsfiddle here

<table class="table table-striped table-bordered table-fixedheader"> <thead> <tr class="success"> <th>answer</th> <th>total</th> <th>pcp</th> <th>ob/gyn</th> <th>pain</th> <th>other</th> </tr> </thead> <tbody style="height:100px"><tr><td>alabama</td> <td>3</td> <td>2</td> <td></td> <td>1</td> <td></td></tr><tr><td>arizona</td> <td>3</td> <td>3</td> <td></td> <td></td> <td></td></tr><tr><td>california</td> <td>35</td> <td>18</td> <td>9</td> <td>8</td> <td></td></tr><tr><td>colorado</td> <td>2</td> <td>2</td> <td></td> <td></td> <td></td></tr><tr><td>connecticut</td> <td>2</td> <td>2</td> <td></td> <td></td> <td></td></tr><tr><td>district of columbia</td> <td>1</td> <td></td> <td></td> <td>1</td> <td></td></tr><tr><td>florida</td> <td>20</td> <td>16</td> <td>1</td> <td>3</td> <td></td></tr><tr><td>georgia</td> <td>6</td> <td>1</td> <td>5</td> <td></td> <td></td></tr><tr><td>illinois</td> <td>12</td> <td>8</td> <td>2</td> <td>2</td> <td></td></tr><tr><td>indiana</td> <td>2</td> <td>2</td> <td></td> <td></td> <td></td></tr><tr><td>kansas</td> <td>2</td> <td></td> <td>2</td> <td></td> <td></td></tr><tr><td>kentucky</td> <td>1</td> <td>1</td> <td></td> <td></td> <td></td></tr><tr><td>maryland</td> <td>2</td> <td>2</td> <td></td> <td></td> <td></td></tr><tr><td>massachusetts</td> <td>4</td> <td>3</td> <td></td> <td>1</td> <td></td></tr><tr><td>michigan</td> <td>5</td> <td>4</td> <td></td> <td>1</td> <td></td></tr><tr><td>missouri</td> <td>2</td> <td>2</td> <td></td> <td></td> <td></td></tr><tr><td>nevada</td> <td>1</td> <td>1</td> <td></td> <td></td> <td></td></tr><tr><td>new jersey</td> <td>14</td> <td>7</td> <td>4</td> <td>3</td> <td></td></tr><tr><td>new mexico</td> <td>1</td> <td>1</td> <td></td> <td></td> <td></td></tr><tr><td>new york</td> <td>25</td> <td>13</td> <td>5</td> <td>7</td> <td></td></tr><tr><td>north carolina</td> <td>6</td> <td>1</td> <td>1</td> <td>4</td> <td></td></tr><tr><td>ohio</td> <td>6</td> <td>5</td> <td>1</td> <td></td> <td></td></tr><tr><td>pennsylvania</td> <td>16</td> <td>9</td> <td>4</td> <td>3</td> <td></td></tr><tr><td>tennessee</td> <td>2</td> <td>2</td> <td></td> <td></td> <td></td></tr><tr><td>texas</td> <td>20</td> <td>10</td> <td>5</td> <td>5</td> <td></td></tr><tr><td>virginia</td> <td>2</td> <td>2</td> <td></td> <td></td> <td></td></tr><tr><td>washington</td> <td>1</td> <td>1</td> <td></td> <td></td> <td></td></tr><tr><td>west virginia</td> <td>1</td> <td>1</td> <td></td> <td></td> <td></td></tr><tr><td>wisconsin</td> <td>1</td> <td>1</td> <td></td> <td></td> <td></td></tr></tbody> </table>

please dont mark duplicate. have tried every other way,my table construction differs others questions.

p:s: new here, feeling hard jfiddle link in post.sorry bad format

apply code css

tbody { background-color: #ddd; height: 300px; overflow: auto; } td { padding: 3px 10px; } thead > tr, tbody{ display:block; }

twitter-bootstrap

node.js - node . and npm start don't work -



node.js - node . and npm start don't work -

the title says of problem. when seek run node . get:

module.js:340 throw err; ^ error: cannot find module 'static-favicon' @ function.module._resolvefilename (module.js:338:15) @ function.module._load (module.js:280:25) @ function.module.runmain (module.js:497:10) @ startup (node.js:119:16) @ node.js:902:3

there seems no modules folder actually. i'm running express in empty directory

npm works fine however. fresh express install if matters. help awesome, thanks!

the total error messages:

new-host-2:~ brennan$ cd desktop/ new-host-2:desktop brennan$ mkdir test4 new-host-2:desktop brennan$ cd test4 new-host-2:test4 brennan$ express -e create : . create : ./package.json create : ./app.js create : ./public create : ./public/javascripts create : ./public/images create : ./public/stylesheets create : ./public/stylesheets/style.css create : ./routes create : ./routes/index.js create : ./routes/users.js create : ./views create : ./views/index.ejs create : ./views/error.ejs create : ./bin create : ./bin/www install dependencies: $ cd . && npm install run app: $ debug=test4 ./bin/www new-host-2:test4 brennan$ node app.js module.js:340 throw err; ^ error: cannot find module 'static-favicon' @ function.module._resolvefilename (module.js:338:15) @ function.module._load (module.js:280:25) @ module.require (module.js:364:17) @ require (module.js:380:17) @ object.<anonymous> (/users/brennan/desktop/test4/app.js:3:15) @ module._compile (module.js:456:26) @ object.module._extensions..js (module.js:474:10) @ module.load (module.js:356:32) @ function.module._load (module.js:312:12) @ function.module.runmain (module.js:497:10) new-host-2:test4 brennan$ npm start app.js npm err! error: enoent, open '/users/brennan/desktop/test4/node_modules/app.js/package.json' npm err! if need help, may study *entire* log, npm err! including npm , node versions, at: npm err! <http://github.com/npm/npm/issues> npm err! scheme darwin 12.4.0 npm err! command "node" "/usr/local/bin/npm" "start" "app.js" npm err! cwd /users/brennan/desktop/test4 npm err! node -v v0.10.26 npm err! npm -v 1.4.7 npm err! path /users/brennan/desktop/test4/node_modules/app.js/package.json npm err! code enoent npm err! errno 34 npm err! npm err! additional logging details can found in: npm err! /users/brennan/desktop/test4/npm-debug.log npm err! not ok code 0 new-host-2:test4 brennan$ forever app.js warn: --minuptime not set. defaulting to: 1000ms warn: --spinsleeptime not set. script exit if not remain @ to the lowest degree 1000ms module.js:340 throw err; ^ error: cannot find module 'static-favicon' @ function.module._resolvefilename (module.js:338:15) @ function.module._load (module.js:280:25) @ module.require (module.js:364:17) @ require (module.js:380:17) @ object.<anonymous> (/users/brennan/desktop/test4/app.js:3:15) @ module._compile (module.js:456:26) @ object.module._extensions..js (module.js:474:10) @ module.load (module.js:356:32) @ function.module._load (module.js:312:12) @ function.module.runmain (module.js:497:10) error: forever detected script exited code: 8

after using express-generator generate node application, need install dependencies project. done via:

$ npm install

once done, can start app using npm:

$ npm start

by default, express generated apps state start command npm (you can view in package.json file):

"start": "node ./bin/www"

so execute same thing via command line, run:

$ node ./bin/www

node.js express npm

html - php - edit values from file -



html - php - edit values from file -

i having problem editing value i've displayed file. i've gathered bits , pieces don't understand gives me desired functionality. appreciate help possible.

i have site displays values after match has been found:

search "s1value1" in sample.yml , display after ":" (this works fine)

search.php

$lines_array = file('sample.yml'); $search_string = "s1value1"; foreach($lines_array $line) { if(strpos($line, $search_string) !== false) { list(, $new_str) = explode(":", $line); $new_str = trim($new_str); } }

display.php

<form action="edit_value.php" method="post"> <td>s1value1:</td> <td>value:<input type="text" name="input1" value=<?php echo "$new_str"; ?>><input type="submit" name="submit" value="save"></td> </form>

but in display.php want able edit what's in input textbox , save file

(have no thought how that)

edit_value.php

have no thought here :(

here sample input file. i'm using .yml, cannot alter that.

sample.yml

service1: s1value1: 1 s1value2: 2 service2: s2value1: 1 s2value2: 2

thanks

assuming have @ moment ' one' value. can utilize preg_replace quite simple pattern.

$str = ' one'; $str = preg_replace('/([ ]){1}([a-z]){3}/', ' two', $str);

on pattern ([ ]){1}([a-z]){3}

([ ]){1} means preceeded 1 whitespace , ([a-z]){3} 3 lowercase letters in alphabet between or a z.

after comma ' two' actual replacement. can want. , 3rd target replacing.

ps: im not in regex please right me if im wrong

php html

Should I always provide default value in php for TEXT fields in mysql -



Should I always provide default value in php for TEXT fields in mysql -

i seek insert new record in table using eloquent orm included laravel framework insert statement resulted follows:

inset table_x (field_x, field_y, field_z) values (0, 1, 2)

i receive next error mysql server:

sqlstate[hy000]: general error: 1364 field 'field' doesn't have default value

i not provide field in insert statement. field of type text , mysql docs: "blob , text columns cannot have default values".

so have provide myself default value in php code text fields? or maybe should eloquent take care of , set empty string automatically on insert?

mysql not back upwards having default values in text columns. have manually tell laravel/mysql set in column. example.

insert table_x (field_x, field_y, field_z, your_text_field) values (0, 1, 2, "");

or

insert table_x (field_x, field_y, field_z, your_text_field) values (0, 1, 2, null);

so in eloquent model, you'll have like.

$mymodel->your_text_field = '';

or

$mymodel->your_text_field = null;

depending on whether have set column nullable or not.

update: mihai crăiță question author commented in answer, , in github ticket, can set default columns in eloquent model way, don't need worry having set manually time.

class mymodel extends eloquent { protected $attributes = array('your_text_field' => ''); ... }

php mysql laravel eloquent

sql - appending staging table to main, based on multiple columns, lots of nulls -



sql - appending staging table to main, based on multiple columns, lots of nulls -

bringing rows accounting scheme staging table. want append new recs in staging table main table. there no primary key because there no unique identifier in row besides looking @ every column. lots of nulls because not every column needs filled in.

example data:

staging: budget_line|date |fund|amount|description|po_number 1 |20140623 |xyz |12.00 |donut |{null} 1 |{null} |xyz |3.00 |{null} |12345 1 |20140623 |abc |4.00 |tire |{null} 2 |20140623 |xyz |12.00 |donut |{null} 1 |20140623 |xyz |12.00 |bobs donut |{null} main: budget_line|date |fund|amount|description|po_number 1 |20140623 |xyz |12.00 |donut |{null} 1 |{null} |xyz |3.00 |{null} |12345 1 |20140623 |abc |4.00 |tire |{null}

i've been doing this:

insert main select budget_line ,date ,fund ,amount ,description ,po_number staging not exists ( select budget_line ,date ,fund ,amount ,description ,po_number main ((staging.budget_line = main.budget_line) or (staging.budget_line null , main.budget_line null)) , ((staging.date = main.date) or (staging.date null , main.date null)) , ((staging.fund = main.fund) or (staging.fund null , main.fund null)) , ((staging.amount = main.amount) or (staging.amount null , main.amount null)) , ((staging.description = main.description) or (staging.description null , main.description null)) , ((staging.po_number = main.po_number) or (staging.po_number null , main.po_number null)) )

i'm getting aren't coming on , can't figure out why. have 28 fields though. there easier way this?

you've got problem null handling..

try instead - concatenates of fields single key column, , tests that:

insert main select budget_line ,date ,fund ,amount ,description ,po_number staging not exists ( select 1 main staging.budget_line & staging.date & staging.fund & staging.amount & staging.description & staging.po_number = main.budget_line & main.date & main.fund & main.amount & main.description & main.po_number)

sql ms-access

ios - UICollectionView cellForItemAtIndexPath Not Called within UITabBarController -



ios - UICollectionView cellForItemAtIndexPath Not Called within UITabBarController -

i have uicollectionview within uiviewcontroller. uiviewcontroller both info source , delegate uicollectionview. populates fine, , works expected. however, when seek , embed uiviewcontroller within uitabbarcontroller via storyboard editor, -(uicollectionviewcell *)collectionview:(uicollectionview *)collectionview cellforitematindexpath:(nsindexpath *)indexpath method no longer called.

embedding uiviewcontroller within uitabbarcontroller alter i've made. when remove uitabbarcontroller goes working expected. has else seen type of behavior? missing cause this?

the problem parent view controller's adjust scroll view insets checkbox on. way uicollectionview thinks doesn't have visible cells , doesn't phone call cellforitematindexpath method. unchecking property resolve problem. can find attributes inspector -> view controller / layout section -> adjust scroll view insets. uncheck , voila.

ios xcode uiviewcontroller uitabbarcontroller uicollectionview

How to merge branches on github.com without doing pull request? -



How to merge branches on github.com without doing pull request? -

it looks github allows merging of branches making pull request and then merging.

is there way merge mobile master in single step without using command line locally?

i see button, creates pull request needs merged in sec step:

merge on machine, push?

git merge mobile git force

pull requests repositories don't control, and/or code review process.

github

file - Generate path string of subfolder in the working directory for R -



file - Generate path string of subfolder in the working directory for R -

in r, want load file in subfolder in working directory. convinent, want generate path of folder combine file want access. don't know how it.

please help me.

thank lot.

use file.path

> file.path(getwd(), "yourpath") [1] "c:/users/john/documents/yourpath"

r file

python - Unable to display all the information except for first selection -



python - Unable to display all the information except for first selection -

i using next code process list of images found in scene, before gathered information, namely tifpath , texpath used in function.

however, illustration in scene, there 3 textures, , hence should seeing 3 sets of tifpath , texpath seeing 1 of them., whereas if running check surshaderout or surshadertex able see 3 textures info.

for example, 3 textures file path follows (in surshadertex): /user_data/testshader/texturetga_01.tga, /user_data/testshader/texturetga_02.tga, /user_data/testshader/texturetga_03.tga

i guess trying why in for statement, able print out 3 results , yet bypass that, printing out single result.

any advices?

surshader = cmds.ls(type = 'surfaceshader') con in surshader: surshaderout = cmds.listconnections('%s.outcolor' % con) surshadertex = cmds.getattr("%s.filetexturename" % surshaderout[0]) path = os.path.dirname(surshadertex) f = surshadertex.split("/")[-1] tifname = os.path.splitext(f)[0] + ".tif" texname = os.path.splitext(f)[0] + ".tex" tifpath = os.path.join(path, tifname) texpath = os.path.join(path, texname) converttext(surshadertex, tifpath, texpath)

only 2 lines part of for loop. rest execute once.

so first runs:

surshader = cmds.ls(type = 'surfaceshader') con in surshader: surshaderout = cmds.listconnections('%s.outcolor' % con) surshadertex = cmds.getattr("%s.filetexturename" % surshaderout[0])

then after loop, 1 surshader, 1 surshaderout, , 1 surshadertex, next executed once:

path = os.path.dirname(surshadertex) f = surshadertex.split("/")[-1] tifname = os.path.splitext(f)[0] + ".tif" texname = os.path.splitext(f)[0] + ".tex" tifpath = os.path.join(path, tifname) texpath = os.path.join(path, texname)

indent same lines above it, , it'll run each element of surshader instead of once.

python list maya

ruby - Rails Routes Evaluating Incorrectly -



ruby - Rails Routes Evaluating Incorrectly -

i'm using rails 2.3.18 , ruby 1.8.7

i have in view:

link_to 'download file', {:controller => 'inventory_data', :action => 'download_exported_inventory_items', :reference_id => 'somehashvalue'}

this outputs next link:

<a href="/vendors/inventory/download_exported_inventory_items?reference_id=somehashvalue">download file</a>

i have route specified in routes.rb

map.resources :inventory_data, :path_prefix => "vendors" |vendor| map.download_exported_inventory_items 'vendors/inventory/download_exported_inventory_items', :controller => :inventory_data, :action => "download_exported_inventory_items" end

when click on link, error caused beingness routed different controller action (specifically 'inventory_item'). looked rails route debugging , found way check controller action url maps to. set in console:

r = actioncontroller::routing::routes r.recognize_path "/vendors/inventory/download_exported_inventory_items"

which returned following:

=> {:controller=>"inventory_data", :id=>"download_exported_inventory_items", :action=>"inventory_item"}

any thoughts on how routes mixed this, or can debug problem further?

thanks in advance.

had before route matching because of way params[:id] set.

map.inventory_item 'vendors/inventory/:id', :controller => :inventory_data, :action => "inventory_item"

where

params[:id] = "download_exported_inventory_items"

ruby-on-rails ruby debugging routing

javascript - Swig Templates List Item Number -



javascript - Swig Templates List Item Number -

i can't figure out how print number of list item using swig templates. example( 1, 2, 3, 4, 5 ).

<ul> {% result in results %} <li> <span>item number: {{n}}</span> {{ result.title }} </li> {% endfor %} </ul>

you can find reply under “task #1” heading on page:

http://bits.shutterstock.com/2013/03/07/mustache-vs-swig-templating-shootout/

specifically, within {% %} tags in swig, have access variable called loop, has index property:

<ul> {% result in results %} <li> <span>item number: {{ loop.index }}</span> {{ result.title }} </li> {% endfor %} </ul>

see swig docs: http://paularmstrong.github.io/swig/docs/tags/#for

javascript templates swig-template

jquery - One tab's data is being duplicated into other tabs -



jquery - One tab's data is being duplicated into other tabs -

i'm creating jquery tabs, find one's info ( in case iframe ) beingness duplicated in tabs. html looks this

<div class="tabs"> <ul> <li><a href="#room_booking">make booking</a></li> <li><a href="#info"> info </a></li> <li><a href="#edit_pro"> edit info </a></li> </ul> <div id="room_booking"> <iframe src="/booking/"> </iframe> </div> <div id="info"> <fieldset> <label>name : </label><input class="box" type="text" value="{{ userprofile.first_name}} {{userprofile.last_name }}" readonly="" /> <br /> <label>e-mail: </label><input class="box" type="text" value="{{ userprofile.email }}" readonly="" /> <br /> <label>user name : </label><input class="box" type="text" value="{{ userprofile.username}}" readonly="" /> <br /> </fieldset> </div> <div id="#edit_pro"> <iframe src="/edit/"> </iframe> </div> </div>

my .js file has

$(document).ready(function(){ $('.tabs').tabs(); });

this looks - https://drive.google.com/file/d/0b_xsn54pdmu8bdryefzpu1rtqlu/edit?usp=sharing

any thought what's causing this? thanks

remove '#' edit_pro div id.

<div class="tabs"> <ul> <li><a href="#room_booking">make booking</a></li> <li><a href="#info"> info </a></li> <li><a href="#edit_pro"> edit info </a></li> </ul> <div id="room_booking"> <iframe src="/booking/"> </iframe> </div> <div id="info"> <fieldset> <label>name : </label><input class="box" type="text" value="{{ userprofile.first_name}} {{userprofile.last_name }}" readonly="" /> <br /> <label>e-mail: </label><input class="box" type="text" value="{{ userprofile.email }}" readonly="" /> <br /> <label>user name : </label><input class="box" type="text" value="{{ userprofile.username}}" readonly="" /> <br /> </fieldset> </div> <div id="edit_pro"> <iframe src="/edit/"> </iframe> </div> </div>

demo: http://jsfiddle.net/kx5l2/1/

jquery html5

asp.net - Auto refresh inner page aspx -



asp.net - Auto refresh inner page aspx -

i'll seek explaining problem shortly. i'm pupil waiting final exams' grades. hate logging in every 10 minutes , go right section of "student's page".

i go there once, , have refresh every 5 minutes (which less time server disconnects account).

basic browser extensions built html web pages. our student's page .aspx page , hence refreshing brings opening page, still have click on "grades" menu link (which loaded @ same page, inner page).

i want refresh inner page, if i'm looking @ grades page, if click 1 time again on "grades" menu link inner page reloaded, not whole web page.

how can done?

i appreciate if guide me through , not paste me piece of genius code since won't know it.

i give thanks guys !

using html meta tag

> <meta http-equiv="refresh" content="30"> <meta http-equiv="refresh" > content="30;url=test.aspx"> using asp.net, c# , masterpages response.appendheader("refresh", 30 + "; url=test.aspx");

asp.net asp-classic refresh reload

sql server - Select top N with joins -



sql server - Select top N with joins -

i looking bring together 2 tables top n results of other table explained below.

orderheader

oh_id orderdate ---------------------- 1 2014-06-01 2 2014-06-02 3 2014-06-03 4 2014-06-04 5 2014-06-05

orderproducts

op_id oh_id quantity ------------------------------ 1 1 1 2 1 2 3 2 1 4 3 3 5 4 4 6 4 1 7 4 2 8 5 2 9 5 1

i expecting result top 3 orders (4 rows).

oh_id orderdate op_id quantity ------------------------------------------------ 1 2014-06-01 1 1 1 2014-06-01 2 2 2 2014-06-02 3 1 3 2014-06-03 4 3

note: looking bring together 2 tables rather writing sp or looped queries.

select top 3 o.oh_id, o.orderdate, oo.op_id, oo.quantity orderheader o bring together orderproducts oo on o.oh_id = oo.oh_id

sql-server

php - Hash/array compare and merge -



php - Hash/array compare and merge -

i have 2 info sets.

first:

{ "status": "ok", "message": "data show successful", "name0": "al", "city": "", "pree": "r", "allknife": [ { "name": "folder", "pos": "g", "pos_le": "", }, { "name": "folder two", "pos": "g", "pos_le": "", } ] }

second:

{ "status": "ok", "message": "data show successful", "name0": "", "city": "", "pree": "r", "allknife": [ { "name": "folder", "pos": "", "pos_le": "r", }, { "name": "folder two", "pos": "g", "pos_le": "", } ] }

now compare sec info set first info set. if item empty in sec info set, want pulled first info set.

for instance, in sec hash name0 empty value should replaced using value first hash. allknife array should utilize same logic.

i cant understand how implement it. trying array_merge(), no avail.

there lot of things might optimized leave you!

// simple illustration function arfill($example, $input){ foreach($input $key => $value){ if($value == ""){ // easy peasy set $input[$key] = $example[$key]; } if(is_array($value)){ // little recursion here $input[$key] = arfill($example[$key], $input[$key]); } } homecoming $input; }

php arrays

php - Codeigniter multiple Selection and insertion to a database -



php - Codeigniter multiple Selection and insertion to a database -

i trying build fantansy football game league codeigniter , far have problem players selection specific fantansy team. far can see players button add together player @ time. question how create code select 15 players first , insert players database instead of adding 1 @ time...here controller

public function addplayer($playerid) { $this->load->model('team_model'); $data=array( 'gk1'=>$playerid, ); $this->team_model->add_player($data); $this->load->view('header'); $this->load->view('transfer_view'); $this->load->view('footer'); }

and model

function add_player($data){ $this->db->insert('fantansyteams',$data); }

i using grocery grud togenerate views

public function transfers($output = null) { $crud = new grocery_crud(); $crud->set_theme('datatables'); $crud->set_table('player'); $crud->add_action('add', '', 'team/addplayer','ui-icon-plus'); $crud->columns('playername','value','position'); $output = $crud->render(); $this->load->view('header'); $this->load->view('transfer_view',$output); $this->load->view('footer'); }

i think :

create model homecoming players create form checkbox list

example :

<?php foreach ($players $player) : ?> <input type="checkbox" name="players[]" value="<?= $player->id ?>" > <?= $player->name ?> </input> <?php endforeach; ?>

i tried in php file

if (isset($_post['players'])) { // players id list var_dump($_post['players']); } // players list echo "<form action='' method='post' > <input type='checkbox' name='players[]' value='1'> player 1 </input> <input type='checkbox' name='players[]' value='2'> player 2 </input> <input type='checkbox' name='players[]' value='3'> player 3 </input> <input type='checkbox' name='players[]' value='15'> player 15 </input> <input type='submit' value='add'> </form>";

for illustration when take player 1 , 15 var_dump result :

array (size=2) 0 => string '1' (length=1) 1 => string '15' (length=2)

i haven't seek codeigniter if have used codeigniter's forms easy think :)

i hope answers question.

php codeigniter crud

javascript - Json-object gets injected into VAR object upward using push function -



javascript - Json-object gets injected into VAR object upward using push function -

i wonder how happens !

i have json array containing one value. assign var obj named 'first'. assign first's value other var obj called 'second'. then, force json value stored in 'third' 'second' obj push() fun. according knowledge, 'first' obj should have 'hello 1' value & 'second' obj should have ('hello 1' & 'hello 2' values. when check console log of browser, can see both values ('hello 1', 'hello 2') or 2 objects injected both var objects 'first' & 'second'.

function jsonarray() { var first=[{name:"hello 1"}] var second=first; var third=[{name:"hello 2"}] second.push(third); console.log(third); console.log(second); console.log(first); }

i don't know if wrong or out of knowledge. please update me appropriate explanation.

js fiddle: http://jsfiddle.net/micronyks/ellzw/

when assign first value sec var, assing reference, both variables point same object. if want differents objects every variable, need re-create have @ answer: http://stackoverflow.com/a/7486130/2873381

javascript

Passing HTML code to browser via java -



Passing HTML code to browser via java -

i'm working on desktop application using swing. have figured out how log website using post request , receiving html response. need send received html default browser. basically, displaying user browser returning me in background. have read bit set header, etc.

so question is, how can post html code java browser in such manner displays website , not text?

i love not have utilize server (socket) type code because sense there compatibility risk if programme run different computers.

// log website url objtest = new url("http://rccpdems01/ems/login.php/login.php"); httpurlconnection con = (httpurlconnection) objtest.openconnection(); con.setrequestmethod("post"); string datas = "userid=gt737326&psword=test&btnlogin=login"; con.setdooutput(true); dataoutputstream wr = new dataoutputstream(con.getoutputstream()); wr.writebytes(datas); wr.flush(); wr.close(); bufferedreader in = new bufferedreader(new inputstreamreader(con.getinputstream())); string inputline; while ((inputline = in.readline()) != null) system.out.println(inputline); in.close();

if desktop program,i suppose want this

runtime runtime=runtime.getruntime(); string path="www link or local html file"; string browserpath="path browser c:/program files/firefox/firefox.exe"; process process=runtime.exec(browserpath + path); process.waitfor();

java html swing

java - Math -not getting result when less than 1 -



java - Math -not getting result when less than 1 -

i have math problem. simple one, reason can't simple math action show within textview.

i want show user knowledge entered values calculation double. tried getting textview using double.tostring.. code is

double knoledgepercentage = ((100/(endingpoint - startingpoint))*knowncount); tv.settext(double.tostring(knoledgepercentage));

the thing tried doing math number, see variables ok. id did this:

double knoledgepercentage = ((100/400)*3); tv.settext(double.tostring(knoledgepercentage));

and still shows 0.0 in textview. just clear problem not using textview doing math.

you using integer partition in java, truncates decimal, because int divided int must still yield int. so, 100/400 0 in java, not 0.25. assigned double , promoted double, 0.0.

cast 1 of literals double or utilize double literals forcefulness floating-point math.

double knoledgepercentage = (((double) 100/400)*3);

or

double knoledgepercentage = ((100.0/400)*3);

java android math

java - SharedPreference long not translating to a String when using .valueOf() -



java - SharedPreference long not translating to a String when using .valueOf() -

i not sure why unusual reason long not converting string used programatically fire off message desired .valueof(constants.mynumber)

here code using:

shortmessagemanager.sendtextmessage(string.valueof(constants.mynumber), null, "hey there tom bob office downwards hall.", null, null);

here code used save number - set in onclicklistener:

string num1string = num1.gettext().tostring(); long longnum1 = long.parselong(num1string); sharedpreferences.editor editor = prefs.edit(); prefs.edit().putlong(constants.mynumber, longnum1).commit();

here code trying pull from:

import android.content.sharedpreferences; public class constants { public static string pref_name = "sharedstring"; public static string mynumber = "mynumber"; sharedpreferences prefs;

}

i feeling missing silly in here , maybe sec set of eyes looking @ can help. ideas?

java android sharedpreferences

javascript - clearing textbox on click -



javascript - clearing textbox on click -

i making basic chat web app. accomplish functionality , working on user experience. learning js , jquery. want able clear input box of text click within box come in in new text/msg. i'm not sure how so. here have far.

i added line thinking accomplish intend isn't occurring.

$("form#my_msg").onclick().val("");

code:

<script type="text/javascript"> $(document).ready(function() { // connect var socket = io.connect('http://' + document.domain + ':' + location.port); // response browser socket.on('response', function(msg) { $('#log').append("<br>" + msg.data); }); // send message $('form#broadcast').submit(function(event) { socket.emit('send message', { data: "<b>" + $('#username').val() + "</b>" + " --> " + $('#my_msg').val()}); homecoming false; }); $("form#my_msg").onclick().val(""); }); </script> <body class="body"> <form id="broadcast" method="post" action="#" class="form-group"> <input type="text" id="username" placeholder="username" class="form-control"> <input class="form-control" type="text" id="my_msg" placeholder="enter message here..."> <button type="submit" class="btn tbn-default" style="background-color: #80ff80;">send</button> </form> <h2>chat</h2> <div id="log"></div> </body>

with respect comment question!

clearing textbox on every focus or click not thought chat web app.

explain details in comment saying why should not follow clearing text field on focus in such scenario.

you can script clear text on submit after calling ajax phone call send message receiver.

// send message $('form#broadcast').submit(function(event) { socket.emit('send message', { data: "<b>" + $('#username').val() + "</b>" + " --> " + $('#my_msg').val()}); $("#my_msg").val(""); homecoming false; });

javascript jquery html flask

c++ - Overwritting the content of file on each std::ofstream call -



c++ - Overwritting the content of file on each std::ofstream call -

the next code

#include <fstream> void print( std::ofstream &f, int ) { f << << '\n'; } int main () { std::ofstream fout( "out.txt" ); print( fout, 1 ); print( fout, 2 ); homecoming 0; }

produces output this

1 2

however want see 2. in other words, want overwrite content of output file whenever phone call print.

the reason that, want phone call update function in intervals. result, each time update function called, new stats should appear in output file (not appending current previous one).

p.s: putting fout.clear() between 2 print calls won't job.

simply utilize std::ofstream::seekp() reset output position between print() calls

std::ofstream fout( "out.txt" ); print( fout, 1 ); fout.seekp(0); // <<<< print( fout, 2 );

note fout.clear() resets error states of stream.

c++ file fstream

class and functions in python -



class and functions in python -

i'm new python , i'm trying classes , objects, have script:

#!/usr/bin/env python class test: def __init__(self, username): self.username = username def name_again(self): in range(0-4): print ("username %s" %self.username) ahmed = test('ahmbor') ahmed.name_again()

i'm expecting script print "username ahmbor" 5 times when run script, have nil please help find what's wrong this

you telling range() loop on 0-4 (subtract 4 zero), -4. because default start @ 0 , count up, empty range:

>>> range(0-4) range(0, -4) >>> len(range(0-4)) 0

use comma instead, , utilize 5 loop 5 times, not 4. endpoint not included:

>>> len(range(0, 4)) 4 >>> len(range(0, 5)) 5

python function class python-3.x

python - Replace in strings of list -



python - Replace in strings of list -

i can utilize re.sub in single string this:

>>> = "ajhga':&+?%" >>> = re.sub('[.!,;+?&:%]', '', a) >>> "ajhga'"

if utilize on list of strings not getting result. doing is:

>>> = ["abcd:+;", "(l&'kka)"] >>> x in a: ... x = re.sub('[\(\)&\':+]', '', x) ... >>> ['abcd:+;', "(l&'kka)"]

how can strip expressions strings in list?

for index,x in enumerate(a): a[index] = re.sub('[\(\)&\':+]', '', x)

your changing value not updating list. enumerate function homecoming tuple (index,value) each item of list

python string

java - Can not install WST on Eclipse 3.7.2 -



java - Can not install WST on Eclipse 3.7.2 -

i trying install wst on eclipse 3.7.2 in order able setup tomcat server.

i tried install new software within of eclipse using site http://download.eclipse.org/webtools/updates

it ends error:

class="lang-none prettyprint-override">cannot finish install because 1 or more required items not found. software beingness installed: eclipse xml editors , tools sdk 3.1.1.v200907161031-7a228dxetaqlqfbnmuhkc8-_drpy (org.eclipse.wst.xml_sdk.feature.feature.group 3.1.1.v200907161031-7a228dxetaqlqfbnmuhkc8-_drpy) missing requirement: java emf model utilities 2.0.201.v201001252130 (org.eclipse.jem.util 2.0.201.v201001252130) requires 'bundle com.ibm.icu [3.8.1.1,4.1.0)' not found cannot satisfy dependency: from: wst mutual core 3.1.1.v200908102300-7b77fz6f7rzhkdiwrlowun (org.eclipse.wst.common_core.feature.feature.group 3.1.1.v200908102300-7b77fz6f7rzhkdiwrlowun) to: org.eclipse.jem.util [2.0.201.v201001252130] cannot satisfy dependency: from: wst mutual plug-in developer resources 3.1.1.v200908102300-7938c9xocmxoeqvxit-qoyvn9bv2 (org.eclipse.wst.common_sdk.feature.feature.group 3.1.1.v200908102300-7938c9xocmxoeqvxit-qoyvn9bv2) to: org.eclipse.wst.common_ui.feature.feature.group [3.1.1.v200908102300-7b5frhdhdmognoekn4gtejxsmpxv] cannot satisfy dependency: from: wst mutual ui 3.1.1.v200908102300-7b5frhdhdmognoekn4gtejxsmpxv (org.eclipse.wst.common_ui.feature.feature.group 3.1.1.v200908102300-7b5frhdhdmognoekn4gtejxsmpxv) to: org.eclipse.wst.common_core.feature.feature.group [3.1.1.v200908102300-7b77fz6f7rzhkdiwrlowun] cannot satisfy dependency: from: eclipse xml editors , tools sdk 3.1.1.v200907161031-7a228dxetaqlqfbnmuhkc8-_drpy (org.eclipse.wst.xml_sdk.feature.feature.group 3.1.1.v200907161031-7a228dxetaqlqfbnmuhkc8-_drpy) to: org.eclipse.wst.common_sdk.feature.feature.group [3.1.1.v200908102300-7938c9xocmxoeqvxit-qoyvn9bv2]

i tried update eclipse, encountered dependencies error:

class="lang-none prettyprint-override">cannot finish install because of conflicting dependency. software beingness installed: c/c++ memory view enhancements 8.3.0.201402142303 (org.eclipse.cdt.debug.ui.memory.feature.group 8.3.0.201402142303) software installed: eclipse platform 3.7.0.i20110613-1736 (org.eclipse.platform.ide 3.7.0.i20110613-1736) 1 of next can installed @ once: debug core 3.7.1.dist (org.eclipse.debug.core 3.7.1.dist) debug core 3.7.0.v20110518 (org.eclipse.debug.core 3.7.0.v20110518) debug core 3.7.1.v20111129-2031 (org.eclipse.debug.core 3.7.1.v20111129-2031) debug core 3.8.0.v20130514-0954 (org.eclipse.debug.core 3.8.0.v20130514-0954) cannot satisfy dependency: from: c/c++ memory view enhancements 8.3.0.201402142303 (org.eclipse.cdt.debug.ui.memory.feature.group 8.3.0.201402142303) to: org.eclipse.cdt.debug.ui.memory.floatingpoint [1.0.0.201402142303] cannot satisfy dependency: from: floating point memory renderer 1.0.0.201402142303 (org.eclipse.cdt.debug.ui.memory.floatingpoint 1.0.0.201402142303) to: bundle org.eclipse.debug.core 3.7.100 cannot satisfy dependency: from: eclipse platform 3.7.2.dist-9nf7uhagfqn9pelwwhc90glz-soeusgymtseirh (org.eclipse.platform.feature.group 3.7.2.dist-9nf7uhagfqn9pelwwhc90glz-soeusgymtseirh) to: org.eclipse.debug.core [3.7.1.dist] cannot satisfy dependency: from: eclipse platform 3.7.0.i20110613-1736 (org.eclipse.platform.ide 3.7.0.i20110613-1736) to: org.eclipse.platform.feature.group [3.7.2.dist-9nf7uhagfqn9pelwwhc90glz-soeusgymtseirh]

i suggest install eclipse kepler (4.3) java ee version.

http://www.eclipse.org/downloads/packages/eclipse-ide-java-ee-developers/keplersr2

this version includes wst.

java eclipse eclipse-plugin