Posts

Showing posts from January, 2013

css - jQuery infinite carousel leaves an empty space when scrolling to the left -

i'm using jquery responsive carousel display images , text. carousel works when clicking on forward (right) button (the hidden slide appears smoothly until gets place), has weird behavior when clicking on backward (left) button, because blank space (as wide slide) appears , after animation completed slide appears suddenly. this html code: <div id='carousel_container'> <div id='left_scroll'><img src='navleft.png' /></div> <div id='carousel_inner'> <ul id="carousel_ul"> <li> ....content...</li> <li> ....content...</li> ......... </ul> </div> <div id='right_scroll'><img src='navright.png' /></div> </div> this css: #carousel_container{ display:table; margin-left:auto; margin-right:auto; } #carousel_inner { float:left; wi

php - Deleting plugins via WordPress admin -

today looking delete number of spam users off admin dashboard in wp , searched them came blank screen. turned off define('wp_debug', false) true. gthen tried delete plugins , cgot white screen did fia ftp still show in wp plugins list. im getting alot of white screen , dont know how fix it. ideas? here issues got when turned on debug: strict standards: redefining defined constructor class flexoarchives in /home/mutantsp/public_html/wp-content/plugins/flexo-archives-widget/flexo_archives_widget.php on line 69 deprecated: assigning return value of new reference deprecated in /home/mutantsp/public_html/wp-content/plugins/flexo-archives-widget/flexo_archives_widget.php on line 801 notice: undefined property: flexoarchives::$opt_yrcount_standalone in /home/mutantsp/public_html/wp-content/plugins/flexo-archives-widget/flexo_archives_widget.php on line 111 notice: undefined property: flexoarchives::$opt_yrcount in /home/mutantsp/public_html/wp-content/plug

How can I compile template class 'Append' from Alexandrescu A. "Modern C++ Design. Generic Programming and Design Patterns Applied"? -

alexandrescu in book implements template class 'append' appending type type list in way: template <class tlist, class t> struct append; template <> struct append<nulltype, nulltype> { typedef nulltype result; }; template <class t> struct append<nulltype, t> { typedef typelist_1(t) result; }; template <class head, class tail> struct append<nulltype, typelist<head, tail> > { typedef typelist<head, tail> result; }; template <class head, class tail, class t> struct append<typelist<head, tail>, t> { typedef typelist<head, typename append<tail, t>::result> result; }; all 'append' specializations accept not more 2 template arguments last 1 accepts 3 template arguments. trying compile code error error c2977: 'append' : many template arguments this happens on either msvc compiler or gcc. 'append' implementation correct? the

highcharts - Indicate an important date on a chart with either a guideline (with text) or an opened callout -

i'm looking way indicate key dates on highchart label eg public holiday. can't find way add labeled guidelines or add opened callout point? appreciated. in highstock have series type called flags opened callout (similar dygraphs annotation ). closest fit indicators referred. see this jsfiddle example of how looks. note how example uses highstock source file, builds highcharts chart. see this documentation official information. in highcharts can highlight points, labels , value in wide variety of ways. first of can add data labels points, renders text next it. secondly can use plot lines highlight values along axis. see this jsfiddle example of how both of these options can used. of course there lots of ways improve , build upon out of box functionality, specific demands , desires.

bash - Why does the pre/absence of xargs affect the output from a subsequent echo command? -

bash noob here, curious in behavior of following shell function (designed pack ascifiied hex sequences): pack() { sedf=$(extended_sed) # choose "-r"/"-e" bsd/linux flavors in=$(sed 's/%//g' <<< "$1") # allow "%41%41..." if [ -z $(grep '\\x' <<< "$in") ] # allow "4142..." in=$(sed -$sedf 's/(..)/\\\\x\1/g' <<< "$in") else # allow "\x41\x42..." in=$(sed -$sedf 's/\\/\\\\/g' <<< "$in") fi echo "$in" | xargs echo -en # pack through -e, suppress cr # testing echo "$in" echo -en "$in" # doesn't pack } both pack "\x41\x41" , pack "4141" produce following output: aa\\x41\\x41 \x41\x41 but when run echo -e "\\x41\

android - Retrofit post request returns 405 error -

i'm new @ using retrofit library. need write method register user. api shown below: post http://blablabla.com/user/ contains 4 fields fio - string email - string phone - string password - string response example: { "result": { "code": 200, "token": "fcac1a3b62cb51374123de565dc12e16" } } it client class: package com.example.bydlokoder.mobigeartest.activities.utils; import retrofit.callback; import retrofit.http.body; import retrofit.http.post; public class blablaclient { public static final string api_url = "http://blablabla.com/"; public interface service { @post("/user") void createuser(@body user user, callback<result> callback); } } it result class object wanna after registration completed: public class result { int code; string token; public string gettoken() { return token; } public int getcode() {

html - Centre divs horizontally not working inside container div -

i've been struggling days must missing stupid, hope can help! basically building site header, body , footer. header div has flash element embedded , working fine. have divs centered using: position: absolute; width: 2000px; margin-left: -1000px; left: 50%; this worked fine until tried footer stay @ bottom of page not overlap rest of content when resizing. got sorted stickyfooter, , putting div outside of container div, , changing divs position 'relative'. but inside container not want center correctly anymore , cant right. ideas please? appreciate it. here html: <!doctype html public "-//w3c//dtd xhtml 1.0 transitional//en" "http://www.w3.org/tr/xhtml1/dtd/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <title>site</title> <link href="css/lum.css" rel="styles

c - Undefined reference to pthread_create() -

this question has answer here: undefined reference pthread_create in linux 9 answers i'm working on linux. #include <pthread.h> void *dealwithuser(void *t); int main(int argc,char **argv){ int rc; rc = pthread_create(&threads[t ++],null,dealwithuser,(void *)connfd); } while compiling, gcc shows "undefined reference 'pthread_create'" you can try adding -lpthread after gcc command

Scala Find Method Syntax -

val underlying: mongodbcollection def find(doc: dbobject): dbcursor = underlying find doc here's hypothetical program. apparently valid implementation of find method, don't understand how method body underlying find doc produce value. how find method evaluate doc parameter, , how underlying variable affecting anything? why not find doc underlying or find doc method body? when method takes 1 parameter, can omit both prefix . , brace () when calling method on object. underlying find doc is same underlying.find(doc) it calls find method on mongodbcollection instance underlying doc parameter.

azure - Web role failing to start because dependent assembly cannot be loaded -

i encountered strange issue startup of web roles. full repro quite complex, managed find root cause put simplified steps. my webrole project depends on assmeblya in turn depends on assemblyb, version=1.0. webrole depends directly on assemblyb, version=2.0. (this comes different nuget packages on don't have control). in end, assemblyb, version=2.0 getting copied \bin folder. website working correctly because in web.config there binding redirect assemblyb version=2.0 (which automatically being put there nuget client). however, when webrole deployed azure, fails start because assemblyb, version=1.0 cannot loaded. i suspect because web role first loaded approot directory web.config has no effect. found can workaround problem generating app.config web-role , duplicating binding redirects there. while works, it's not convenient maintain such setup. does know if known issue azure web roles? tried azure sdk 2.4 , 2.5.1, azure nuget packages date, no custom startup code

encoding - how are smileys encoded in mysql utf-8 mb4 database? -

i changed mysql database utf-8 mb4, users enter smileys mobile phones / mac. works (users can enter smileys , smileys shown in web app on supported devices), whenever have @ table contents (via terminal or mysql workbench) shows each smiley single question mark. how smileys saved? assume got utf-8 mb4 code, there way @ those? thanks! i suspect workbench running in utf8 mode, not utf8mb4. change that. to further verify data stored correctly, select hex(col) ... see actual bytes stored. example: 😁 => f09f9881

Error Pulling private docker repository from mac Boot2Docker -

from mac, install boot2docker , seems work well... when try pull remote private repository using following command: sudo docker pull xxxx/yyyy error message: fata[0000] post http:///var/run/docker.sock/v1.16/images/create?fromimage=xxxx%2fdev%3alatest : dial unix /var/run/docker.sock: no such file or directory when try using command docker pull xxxx/yyyy got error message: pulling repository xxxx/yyyy fata[0000] error: image xxxx/yyyy:latest not found can experiment error message mac boot2docker ? yes please let me know how fix it. thanks. troubleshooting steps try restarting boot2docker boot2docker restart ssh boot2docker boot2docker ssh , see if docker process running ps aux | grep -i '/usr/local/bin/docker -d -d' | grep -v grep can docker pull nginx inside boot2docker? test if docker daemon functional inside boot2docker vm check if docker daemon unix socket file exists inside boot2docker vm ls /var/run/docker.sock these steps should figure

node.js - Why doesn't this if/else work in ejs? -

<% if (title != undefined) { %> <%= title %> <% } elseif(title == undefined) { %> <%= "trendy analytics" %> <% } %> why doesn't sort of thing work in .ejs file? it's else if not elseif : <% if (title != undefined) { %> <%= title %> <% } else if(title == undefined) { %> <%= "trendy analytics" %> <% } %>

html - css Horizontally center div in a div -

Image
i'm trying horizontally center block element on page. here example of want: i cannot use div hard sizing because layout should responsive. http://fiddle.jshell.net/rdy9nmp0/ here code: <div class = "container"> <div class="sub"> <h1> 01</h1> <div class = "icon"><img src="img/settings.png" alt=""> <h2> power inside</h2> <p>cum sociis natoque penatibus et magnis dis parturient montesmus. pro vel nibh et elit mollis commodo et nec augueique</p> <a class="iconlink" href="/">read more</a> </div> </div> <div> css .container { width: 1160px; overflow: hidden; display: inline-flex; margin: 0 auto; } .sub{ padding-top: 30px; padding-bottom: 30px; padding-right: 30px; padding-left: 30px; display: inline-

Attaching kerberos to apache httpclient in java -

i have kerberos token me , want attach httpclient request in java. know how attach basic credentials. want attach kerberos token instead: client.getstate().setcredentials( new authscope(authscope.any), new usernamepasswordcredentials("username", "password") ); the entire gss-api code under rewrite . meanwhile (not tested), can pass gsscredential kerberoscredentials object.

pygame - python sched program possible timing issues -

so have number of events schedule varying delays such : delays = [1,3,5,30, 40, 35, 12, 46, 52] i schedule delays as: s = sched.scheduler(time.time, time.sleep) lagtime in delays: s.enter(lagtime, 1, self.drawoncanvas, (arg1, arg2, arg3)) the function drawoncanvas doing pygame/opengl operations the issue python time module has precision in seconds , want move in milliseconds. can set delays be: delays = [x/1000 x in delays] the scheduler takes arugment of time.time , time.sleep. can use datetime here instead , accomodate it? second doing operations mouse , feels mouse being blocked scheduler. there way stop mouse being blocked? edit: figured need non-blocking scheduler, threading method described here creates new thread ever timer event. there way make single thread invocation? python time module has precision in seconds not on modern platforms -- timestamps have fractional part, while unit of measure seconds, precision typically better milli

Android style inheritance not working -

styles.xml <style name="red" parent="android:textappearance.devicedefault.medium.inverse"> <item name="android:textcolor">#f00</item> </style> <style name="red.large"> <item name="android:textsize">30sp</item> </style> when use this; <button android:id="@+id/save" android:text="@string/save" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_margintop="@dimen/save_margintop" android:gravity="center" style="@style/red.large"/> this button attribute large , doest painting red. why? your red.large style needs use parent attribute. red.large inherit red if changed to: <style name="red.large" parent="red"> <item name="android:textsize">30sp</item> &

osx - SWIG, perl, DynaLoader can't find boot_$Module on OS X -

i trying build , install swig-generated perl api on os x 10.10.2. (it's freeling 3.1 language analysis toolkit.) have generated , compiled swig files, producing freeling.so . but when try use freeling in perl script, error: can't find 'boot_freeling' symbol in /usr/local/lib/libfreeling.dylib @ freeling.pm line 11. but boot_freeling should defined in swig-generated freeling.so , not in libfreeling.dylib (the freeling package lib). (nm -u confirms this: _boot_freeling defined in freeling.so; i'm assuming leading underscore part of object file format.) i have made sure freeling.so comes before libfreeling.dylib in ld_library_path. i've tried unshifting path freeling.so onto @dynaloader::dl_library_path. i suspect not path problem, building os x. in past, have built on ubuntu , works fine. have tweaked gcc options (-bundle instead of -shared). additional info: perl -v:dlext => dlext='bundle'; building soso-0.01.patch.txt produc

php - vagrant + virtualbox Timed out while waiting for the machine to boot -

sorry i'm new vagrant running vagrant 1.4.3 , virtualbox 4.3.26. , host os ubuntu 14.04.2. i php developer , i'm trying make development environment ready couple of projects. and every box try vagrantbox.es same error when running vagrant command. , error : timed out while waiting machine boot. means vagrant unable communicate guest machine within configured ("config.vm.boot_timeout" value) time period. can mean number of things. if you're using custom box, make sure networking working , you're able connect machine. common problem networking isn't setup in these boxes. verify authentication configurations setup properly, well. if box appears booting properly, may want increase timeout ("config.vm.boot_timeout") value. i've looked through same questions , tried config.vm.provider :virtualbox |vb| vb.gui = true end after adding these lines login page in box booting , can run commands in gui interface. surprisingly same

android - Change image height with delay animation -

i'm using libgdx engine in game , started use tween animation: i have in game small 'custom' progress bar. 1 image empty progress bar , second full one, booths have same width , height.what update setting position of full same empty, , when want display progress use: private image fullprogress; //its libgdx image type //i have set process float originalheight = progressempty.getheight(); howmuchprogress = originalheight * process; fullprogress.setheight(howmuchprogress); any ideas how can make change height delay animation, can see few seconds? better use tween engine? given code example, delay should calculated in process . if need visualize delay debugging purposes (for example, faking assetmanager's loading progress), suggest this: private static final float loading_min_time= 2.0f; // delay amount in seconds private float loadingtimer; @override public void render(float delta) { // ... loadingtimer += delta;

ruby on rails - Methods for ActiveRecord that not implies database or convert into Hash/Array -

i have model foo , in index action do: @foos = foo.all and now, on view want know if @foos contain record whit foo.id = whatever one method of @foos.exists?(id: whatever) , method implies bd query , want avoid this. other method @foos.collect(&:id).include?(whatever) implies conversion of @foos array, case avoid. there ways accomplish it? thanks in advance update i want object not know if exists, sorry bad explanation. you can use enumerable#any? check if value exists in array of results: @foos.any? { |foo| foo.id == whatever } this check performed on result array without hitting database again , without converting array structure. update if want object returned, use enumerable#find , this: @foos.find { |foo| foo.id == whatever } this return first occurrence foo.id == whatever .

css - HTML Table Header isn't showing, how can it be fixed? -

sorry if plainly obvious answer, horrible web designer. i making page program, , i'm using table show hotkeys. used css center , remove border. the header of table action, , trigger, not show when open html broswer, table data. point, why happen , how can fixed? a fiddle: http://jsfiddle.net/caffeinetocode/rq9hc7hl/1/ <!doctype html> <html> <head> <title>help</title> </head> <style> body { background: -webkit-linear-gradient(left, #f99200, #fde000); background: -o-linear-gradient(left, #f99200, #fde000); background: -moz-linear-gradient(left, #f99200, #fde000); background: linear-gradient(to right, #f99200, #fde000); } .center { margin: 0; position: absolute; top: 50%; left: 50%; margin-right: -50%; transform: translate(-50%, -50%) } table, td, th { border: none; } td { padding: 10%; } </style> <body> <div class="center"> <table> &

vb.net - VB .Net 2010 to run crystal reports 11 and I am getting This field name not found error -

net 2010 run crystal reports 11 , getting field name not found error when use table value in formula field. trying check date field isnull or not , picking non null value database/view field. if build report in crystal reports 11 stand alone works. crystalreportviewer in vb .net 2010 getting error. field name not known.error in formula ..... details: errorkind this vb code inside formula section. dim x date if {@pi} = "pi" x = datevalue({view_group_totals.ch_pi_open_date}) else if isnull({view_group_totals.ch_open_date}) x = datevalue({view_group_totals.ch_pi_open_date}) else x = datevalue({view_group_totals.ch_open_date}) end if end if formula = x basically cannot field value inside formula section. appreciated. thank you, ravin ![enter image description here][1] the issue has been fixed. fix ... not getting field value validating inside formula. sql queries view did not has field name in sql. when modified sql adding

Grails search from one to many is not working -

here domain class, class company { string name static hasmany = [groups:companygroup] } class companygroup{ string name static belongsto = [company:company] } i receive params contain name of companygroup , want result of company have companygroup found. i did this, def grouplist = account.companies.groups.flatten() def groupresult = grouplist.findall{ it.name ==~ /(?i).*${params.keyword}.*/ } i got companygroups have name params.key above code. want render company list have these group this, def com = company.withcriteria{ eq("groups", grouplist) } render [companies : com] it doesn't work! def com = company.withcriteria{ inlist("groups", grouplist) }

libgdx BitMapFont not working -

i trying use bitmapfont in libgdx based game.i this: bitmapfont font; this.font = new bitmapfont(); render{ gdx.gl.glclearcolor(0x64 / 255.0f, 0x95 / 255.0f, 0xed / 255.0f, 0xff / 255.0f); gdx.gl.glclear(gl20.gl_color_buffer_bit); gdx.app.log(tag, " fps: " + gdx.graphics.getframespersecond()); batch.setprojectionmatrix(cameramanager.camera.combined); batch.begin(); font.setcolor(color.black); font.draw(batch, "time", 4, 4); batch.end(); } and camera managed as: public class cameramanager { public static orthographiccamera camera; public cameramanager(){ camera = new orthographiccamera(constants.viewport_width, constants.viewport_height); camera.viewportwidth = (camera.viewportheight) * ((float) gdx.graphics.getwidth() / (float) gdx.graphics .getheight()); camera.position.set(camera.viewportwidth / 2, camera.viewportheight / 2, 0); camera.update(); } public v

labview - need to average several arrays using while loop and shift register -

i have written vi in labview converts acquired data 2d array. now, want use shift register, , comes out loop, 2d array average of 2d arrays after loop stopped user. appreciate help you can this: code http://img15.hostingpics.net/pics/293772211.png

php - HOW DO I CHECK IF BOTH $_POST['name']=name AND $_POST['phone']=phone exist in a db row? -

if('select * users firstname='$_post['firstname']' , phone='$_post['phone']''){echo 'their match';} parse error: syntax error, unexpected t_variable assuming you using object-oriented mysqli, code this: $phone = ( isset( $_post['phone'] ) && !empty( $_post['phone'] ) ) ? $conn->real_escape_string( $_post['phone'] ) : null; $firstname = ( isset( $_post['firstname'] ) && !empty( $_post['firstname'] ) ) ? $conn->real_escape_string( $_post['firstname'] ) : null; //create mysql query $sql = "select * users firstname='$firstname' , phone='$phone'"; $result = $conn->query($sql); //query database if ($result->num_rows > 0) { //check if there results echo "there match."; } else { echo "no matches."; }

node.js - Mongoose/Express : average of subdocuments -

i have following models : product : var productschema = new schema({ name: string, comments: [{ type: schema.types.objectid, ref: 'comment'}], _user: { type: schema.types.objectid, ref: 'user'} }); comment : var commentschema = new schema({ text: string, rating: number, _product: { type: schema.types.objectid, ref: 'product'} }); what retrieve products along user : router.get('/', function(req, res, next) { product.find().populate('_user').exec(function (err, products) { if (err) return next(err); res.json(products); }); }); i'd add results "average" field contains average of comments each product results : [{name: "product 1", _user: {name: "bob"}, average: 7.65},...] is possible unique query ? need compute , store average in product document each time new comment added ? thanks ! maybe should try calculating "running average". need know how many ratings there a

Modify this jQuery accordion plugin so first tab is open on load -

i'm using code found jquery accordion because don't animation jqueryui accordion. 1 thing have first tab open automatically on load. else great, if has insight, appreciate it. $(document).ready(function() { $('.accordion .item .heading').click(function() { var = $(this).closest('.item'); var b = $(a).hasclass('open'); var c = $(a).closest('.accordion').find('.open'); if(b != true) { $(c).find('.content').slideup(200); $(c).removeclass('open'); } $(a).toggleclass('open'); $(a).find('.content').slidetoggle(200); }); }); .accordion { width: 100%; border-radius: 5px; overflow: hidden; position: relative; left: 2em; } .accordion .item .heading { height: 50px; line-height: 50px; font-size: 17px; cursor: pointer; color: #fff; padding-left: 15px; background: #ee6363 url('arrow.png') no-repeat; backg

java - I'm having issues importing ViewPager with Android Studio? -

i'm trying import project android studio. i'm getting weird errors. information:java: errors occurred while compiling module 'library' information:compilation completed 100 errors , 5 warnings in 26 sec error:(31, 31) java: package android.support.v4.view not exist /users/clxxxii/downloads/jakewharton-viewpagerindicator-8cd549f/library/src/com/viewpagerindicator/titlepageindicator.java in class titlepageindicator, these imports aren't working. import android.support.v4.view.motioneventcompat; import android.support.v4.view.viewconfigurationcompat; import android.support.v4.view.viewpager; android studio recognizes android.support.v4.view. not viewpager, viewconfigurationcompat nor motioneventcompat. know problem be? /////// apply plugin: 'com.android.application' dependencies { compile filetree(dir: 'libs', include: '*.jar') compile project(':android-sdks:extras:google:google_play_services:libproject:google-play-s

Reference method Java 8 -

i want shuffle list. way want using sort method on list of java 8. want assign random number between 0 1 each number , based on sort list. here have , works: list<integer> list = arrays.aslist(1,2,3,4,5); list.sort(comparing(x->new random().nextfloat())); and works. when want use reference method that: list.sort(comparing(random::nextfloat)); i compile time error , dont understand why. after comparator generating random number each element , sorts random number. ideas? thank u in advance the comparing() method expects pass function takes integer , returns sort key, float (or float ) in case. the nextfloat() method in class random not take integer (or int ) argument, method reference random::nextfloat not work - method not have expected signature. you make helper method: public class example { private final random rnd = new random(); private float nextfloat(int dummy) { return rnd.nextfloat(); } public void shuffl

devise - What am I doing wrong? [Rails, belongs_to] -

stuck on nested forms.. order model: class order < activerecord::base belongs_to :user accepts_nested_attributes_for :user end user mode: class user < activerecord::base has_many :orders, dependent: :destroy accepts_nested_attributes_for :orders # include default devise modules. others available are: # :confirmable, :lockable, :timeoutable , :omniauthable devise :database_authenticatable, :registerable, :recoverable, :rememberable, :trackable, :validatable end form view: =form_for @order |order| =order.fields_for :user, @order.user |user| .row .col-md-3 .form-group =user.label :first_name, "name" =user.text_field :first_name, :class => "form-control" .col-md-3 .form-group =user.label :last_name, "last name" =user.text_field :last_name, :class => "form

javascript - flatten and uneven array into an object -

i have array , object representing same data: arrayexample = [ {name: "max", age: 21}, {name: "max.david", age: 27}, {name: "max.sylvia"}, {name: "max.david.jeff"}, {name: "max.sylvia.anna", age: 20}, {name: "max.david.buffy"}, {name: "max.sylvia.craig"}, {name: "max.sylvia.robin"} ]; objectexample = { name: "max", age: 21, children: [ { name: "sylvia", children: [ {name: "craig"}, {name: "robin"}, {name: "anna", age: 20} ] }, { name: "david", age: 27, children: [ {name: "jeff"}, {name: "buffy"} ] } ] }; my objective extend array class have 2 functions flatten transform objectexample arrayexample , uneven opposite, i'm thinking maybe lodash here still didn't find correct way here's i'm

How to display an icon in React Native? -

i need delete button , want use trashcan icon can find everywhere in ios. how can display systemwide trashcan icon react native instead of displaying own icon in image-view? there node module can use gives access font icons likes of ion , fontawesome can find pretty icon want use. it's simple install , use of ios & android. https://github.com/oblador/react-native-vector-icons

javascript - Sencha Ext JS sort criteria sent as a String instead of JSON -

i trying implement server-side sorting sencha ext js , noticed odd. paging portion of json looks fine sort property set string , not array: actual: {"page":1,"start":0,"limit":50,"sort":"[{\"property\":\"firstname\",\"direction\":\"asc\"}]"} expected: {"page":1,"start":0,"limit":50,"sort":[{"property":"firstname","direction":"asc"}]} ext js: ext.require([ 'ext.grid.*', 'ext.data.*', 'ext.panel.*', 'ext.layout.container.border' ]); ext.define('customer',{ extend: 'ext.data.model', fields: [ {name: 'id', type: 'int'}, {name: 'firstname', type: 'string'}, {name: 'lastname', type: 'string'}, {name: 'companyname', type: 'string'} ] });

java - How to add 2 Splashscreen in application -

the first splashscreen hidden after 5 secondes. i want add second splashscreen first before enter in mainactivity. in @drawable/background_1 <= first image splashscreen added. in @drawable/background_2 <= need add image in second splashscreen. splash.xml <?xml version="1.0" encoding="utf-8"?> <relativelayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:background="@drawable/background_1" > </relativelayout> splashscreen.java package org.sbynight.app; import android.app.activity; import android.os.bundle; import android.content.intent; import android.util.log; import android.view.window; import android.view.windowmanager; public class splashscreen extends activity { private static string

sql - CASE switch inner join table mysql -

so have table contains edits on 3 other tables, , need switch inner join depending on value, ce.entity_id. yes, have normalized edits content_edits table, seemed lot easier. select ce.id, ce.file, ce.date_init, ce.content_type, ce.created_by_id, ce.status, ce.date_decide, u.username content_edits ce inner join users u on ce.created_by_id=u.id case ce.entity_type when ce.entity_type=0 inner join m_articles m on ce.entity_id=markers.id when 1 inner join groups g on ce.entity_id=groups.id when 3 inner join e_news e on ce.entity_id=events.id ce.status=1

powershell - Searching for a specific string of text, then replacing the string -

i have php file content similar this: <table class="select_descript" cellspacing="4" cellpadding="0" border="0" align="center" valign="middle"><tbody><tr><td>top songs past week. updated saturday, 21 march 2015</td></tr></tbody></table> i have date in there, want able replace date section in php file current date. i'm thinking of making use of finding both valign="middle"><tbody><tr><td> , word updated , use -replace method. $phpfile = phpfile.php (get-content $phpfile) -replace "(?<=updated ).+","updated (get-date).tolongdatestring()" but stuck expression. you don't under circumstances file being changed. first suggestion create source template file unique token current date goes. ...<td>top songs past week. updated [[date_here]]</td>... then replacement straightforward , foolpr

javascript - Slider run in offline/localhost but not run in online/server -

i write javascript code slider. code run in localhost or offline. not run in online or server. use code. please me. try not solve it. wrong? <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script> <script type="text/javascript"> var imagecount=1; var total=5; function slide(x){ var image = document.getelementbyid('img'); imagecount = imagecount + x; if(imagecount > total) { imagecount=1; } if (imagecount < 1) { imagecount = total; } image.src = "img/image" + imagecount + ".jpg"; } window.setinterval(function slidea(){ var image = document.getelementbyid('img'); ima

c++ - How to keep looping until non-integer is entered -

i have program trying keep looping until entered non-integer. no matter if enter non-integer or integer program still breaks , end. please help int data; { cout<<"enter data: "; cin>>data; cout<<"yes"<<endl; return data; } while(cin.good()); remove return (or write after while) break code before while line...

php - CakePHP: Getting a blank page when renaming the folder -

i working on cakephp project locally when i'm uploading remote server upload "projectname-new". , after doing tests renamed "projectname" , after renaming original "projectname" "projcetname-old". however after renaming new 1 "projectname-new" "projectname" i'm getting blank page. when rename or rename other name "projectname" can view properly, when rename "projectname-old" "projectname" can view project properly. i thought might .htaccess there's nothing weird in file. ideas why might happening? blank page means either don't have debug @ 1 or more (see " debugging " in cakephp book) or have space or whitespace after closing ?> tag @ end of 1 of files.

node.js - Node/Express/Jade passing username back to view -

this first project these technologies, typically angular, working charity ( , keen learn node ). day three. during login, method called: schema.statics.authenticateandload = function(req, res, next) { var userid = req.body.email; res.locals.userid = userid; this supposed store value doesn't need reentered. if login fails, this: return next('login failed. please enter details , try again.'); then in jade template: if(locals.userid) p welcome #{userid} else p welcome the actual template has code try want: input(type='text', name='email', id="inputemail", placeholder="email", value="#{body.email || ''}") but not work. so, think means setting value in result lost when call 'next', but, because it's passing in error object show on screen, i'm not sure how go making sure error shows , make value pass through . right now, text says 'welcome' , never &

Expression Engine module DevDemon – Updater displaying php errors on local when run by MAMP -

in local environment have tried install expression engine module updater devdemon. both master mamp php.ini file , local php.ini file have following settings: error_reporting = e_all & ~e_strict & ~e_deprecated & ~e_notice & ~e_warning display_errors = off however these errors still displaying: a php error encountered severity: 8192 message: non-static method updater_helper::arrayextend() should not called statically, assuming $this incompatible context filename: updater/api.updater.php line number: 109 php error encountered severity: 8192 message: non-static method updater_helper::getthirdpartypath() should not called statically, assuming $this incompatible context filename: updater/api.updater.php line number: 132 php error encountered severity: 8192 message: non-static method updater_helper::getthemepath() should not called statically, assuming $this incompatible context filename: updater/api.updater.php line number: 133 php error encountered s

symfony - Uploading Files using AngularJS and symfony2 -

Image
i used angularjs example provided in http://jsfiddle.net/jejenny/zg9re/ upload file local machine. work angularjs(frontend) , symfony2(backend),and have send email attachement(as rest web service) have problem,i didn't email attachment,this error in console: this code: <div ng-controller="mailnewctrl1"> <input type="file" nv-file-select="" id="id_file" uploader="uploader" file-model="myfile" > <button id="id_submit" class="btn btn-info w-xs" ng-click='usersend();'>send</button></div> and controller: 'use strict'; angular.module('app', [ 'nganimate', 'ngcookies', 'ngresource' ]) .controller('mailnewctrl1', ['$scope', '$http' ,'fileupload' , function($scope,$http,fileupload) { $scope.errors = []; $scope.msgs = []; $scope.usersend = function() { $scop