Posts

Showing posts from June, 2013

asp.net mvc 4 - MVC 4 is overwriting specific Action-Parameters -

mvc 4 present me strange behaviour @ moment. imagine following code: testcontroller.cs public class testcontroller : controller { public actionresult index(function function, string action) { return view(); } public class function { public string action { get; set; } } } it seems, when call url directly through browser (localhost:port/test), action-property gets automatically filled "index". if action named "mysuperduperactionwhichgetsinvokedquiteoften", methodname in property. can explain mvc doing here? problem is, of course want fill stuff myself, example through ajax-query. if mvc filling in property itself, breaks behaviour. i could, of course, rename property , working, still quite interesting what's going on. edit i understand second parameter, string action, get's filled method-name. why on earth mvc bind any property/parameter named same request-value of it? it problem default mo

android - Navigation Type (Fixed Tabs + Swipe) -

in application have tabhost tabwidget have several tabs. need tab show me inside tabcontent schedule grid allow swipe right , left move through months. need tab stay fixes , schedule swipes. the navigation type (fixed tabs + swipe) allow me that? understand navigation allow swipe tab don't stay same. what need possible? , attention. i possible, stay codes on tabhost , tabwidget. so assume 1 of tabs calling activity named schedule.class, default tabhost not allow swiping change tab feature, fine. so in schedule activity, using viewpager , learnt how use article: http://thepseudocoder.wordpress.com/2011/10/05/android-page-swiping-using-viewpager/ which pretty easy understood. may try use it, hope answered question update: here's sample schedule.class @override protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.schedule); viewpager viewpager = (viewpager) findviewbyid(r.id.viewp

google app engine - Schedule 2 cron jobs -

how cron 2 tasks below (i want 2 cron jobs run in 30 seconds difference.) cron: - description: task1 url: /task1 schedule: every 1 minutes 10:00 14:00 - description: task2 url: /task2 schedule: every 1 minutes 10:00:30 14:00:30 the cron jobs don't allow seconds specified. however, use the task class , set countdown amount on task2 equal 30 seconds. i don't think timing guaranteed, should work approximately well.

Windows Server AppFabric 1.1 - Failed to read remote registry key from host -

i have installed , configured appfabric cache cluster 1 host (the local machine). use sql provider. when launch caching administration windows powershell using administrator privileges, got following error, use-cachecluster : errorcode<errcadmin040>:substatus<es0001>:failed connect hosts in cluster @ line:1 char:62 + import-module distributedcacheadministration;use-cachecluster <<<< + categoryinfo : notspecified: (:) [use-cachecluster], datacachee xception + fullyqualifiederrorid : microsoft.applicationserver.caching.datacacheexc eption,microsoft.applicationserver.caching.commands.usecacheclustercommand when opened dcacheadministration.log shows below, host xxx reachable.,distributedcache.cacheadmin,verbose,2013-5-2 13:54:06.042 failed read remote registry key host xxx: microsoft.applicationserver.caching.datacacheexception: errorcode<errcadmin026>:substatus<es0001>:remote registry access failed on host xxx. check i

php - In ZF2, How we can add conditional form fields on some specific selection in select box or after clicking on check box -

how can add conditional form fields on specific selection in select box or after clicking on check box in zf2 , validate server side code using zf2 feature validation? there no way add dynamic field in zf2 validation lib.

sql server - stored proc from multiple select statements in Tsql -

-> want write stored proc outputs columns 2 select statements ->the columns 1 select statement inputs second select statement create procedure sp_proc @inputid int begin select t1.ticketid ticket, t2.name name, t3.status status, t2.id id table1 t1 inner join table2 t2 on t1.ticketid= t2.ticketid inner join table3 t3 on t3.name = t2.name t1.ticketid not null , t2.id = @inputid select t1.ticketid, t2.name , d.desc, t2.id table1 t1 inner join table2 t2 on t1.ticketid= t2.ticketid inner join( select top 1 table4 t4 order t4.date t4.ticketid = ticket)as d on t4.ticketid = t2.ticketid t4.ticketid =ticket i want ticket, name,status, id , desc when user supplies @inputid proc an inline scalar query work create procedure sp_proc @inputid int select t1.ticketid ticket, t2.name name, t3.status status, t2.id id, [desc] = (select top(1) [desc] table4 t4 t4.ticketid = t1.ticketid order t4.date) table1 t1 inner join table2 t2 o

django - what might delay my celery tasks? -

lo guys, i have lil problem , maybe me figure out happening here: i have thousands of same tasks should execute in milliseconds , right after restart worker execute in milliseconds, right after logging of bunch of tasks big blob celery saying done ( http://d.pr/n/66h ) in lager time frame .. , after each of tasks take around 5-13s execute. made me calculate celery might done of tasks in week of execution time. (aaaaahhhhh) after worker restart 30-60 task executed in normal speed say. after 1 result every few seconds - mentioned above kinda 4-13s. sure in cases there little bit more than in others, not justify differences 0.08s 13s! im using redis broker (in gonna switch rabbitmq soon) , result backend , task saves data solr instance of connections should still done in milliseconds! id able figure out delays tasks. anybody? cheery andy we had same problem here. solved problem playing aroung celery-settings in our django-settings. after decreasing concurrency (to

xml - PL/SQL unique column identification from two table -

i using oracle 11g. have pl/sql procedure reading xml using xquery xmltype column in table. xml contains data of department , sections. department has 1 many relationship sections i.e. department can have 1 or multiple sections , there may instances department not have sections. structure of xml such <data> tag identifies department , set of corresponding sections. xml <rowset> <data> <department> <department_id>dep1</department_id> <department_name>mydepartment1</department_name> </department> <sections> <sections_id>6390135666643567</sections_id> <sections_name>mysection1</sections_name> </sections> <sections> <sections_id>6390135666643567</sections_id> <sections_name>mysection2</sections_name> </sections> </data> <data> <department> <department_id>dep2</department_id> <department_name&g

ios - is iPhone 5 always Returns False -

Image
i using following code (in appdelegate ) detect if device iphone 5 bool isiphone5 = cgsizeequaltosize([[uiscreen mainscreen] preferredmode].size,cgsizemake(640, 1136)); it returns false always. not first time used code. eventhe nslog returns {320, 480} nslog(@"%@",nsstringfromcgsize([[uiscreen mainscreen] bounds].size)); note: app ipad , made universal. have 2 storyboards why need detection code. thanks this should work mate, bool isiphone5 = ([[uiscreen mainscreen] bounds].size.height == 568); and make sure use 4-inch simulator

c++ - How to know if a type is a specialization of std::vector? -

i've been on problem morning no result whatsoever. basically, need simple metaprogramming thing allows me branch different specializations if parameter passed kind of std::vector or not. some kind of is_base_of templates. does such thing exist ? in c++11 can in more generic way: #include <type_traits> #include <iostream> template<typename test, template<typename...> class ref> struct is_specialization : std::false_type {}; template<template<typename...> class ref, typename... args> struct is_specialization<ref<args...>, ref>: std::true_type {}; int main() { typedef std::vector<int> vec; typedef int not_vec; std::cout << is_specialization<vec, std::vector>::value << is_specialization<not_vec, std::vector>::value; typedef std::list<int> lst; typedef int not_lst; std::cout << is_specialization<lst, std::list>::value << is_specialization&

oop - PHP Setup Object-oriented classes correctly? -

i've been told have create config.php file hold of classes. for example let's have 3 classes. class 1: house class 2: mycar class 3: road and in config.php call them: $house = new house(); $mycar = new mycar(); $road = new road(); and include config.php file in every page, example index.php. but now, want extend class road. i can't include config.php in class? or include other' class file in while included in config.php. is wrong way of setup classes? how can extend classes without having errors. do have create new object everytime? example: instead of including config.php ill this: /** * index.php **/ include("class/house.class.php"); $class = new house(); echo $class->echome("hey"); and in every file same, creating new objects, can extend specific classes when needed? function autoload($class) { if (is_file($file = 'www/content/includes/class/'.$class.'.php')) { re

actionscript 3 - "Call to a possibly undefined method" error when the function is in the same class -

i have class function a() , b(). @ point b() calls a(). said error. whats wrong here? here's code http://pastebin.com/xhmyrk2z lettertonumber isn't static, others are.

oracle - Performing arithmetic operation on certain rows and displaying the result -

below table contents: select * summary_weekly_sales; distributor date_of_activation number_of_sales -------------- ------------------ --------------- charan 25-apr-13 23 charan 26-apr-13 2 charan 28-apr-13 5 charan 29-apr-13 50 anil 25-apr-13 13 anil 26-apr-13 4 anil 28-apr-13 5 anil 29-apr-13 30 in ireport date_of_activation input parameter (but here taking date_of_activation 29-apr-13), want output displayed below: distributor avg_sales_week number_of_sales -------------- --------------- --------------- charan 10 50 anil 7.33 30 where, avg_sales_week average week sales per distributor (i.e. 7 days of 29-apr-13) i.e. charan distributor average = (5+2+23)/3 number_of_sales sales done on 29-apr-13 i tried wm_concat functio

Set a maximum depth of JSON serialization in .NET Web API -

let's have these entitites these relations: this fictious example, , not current entities. course user newsposts courses have many users, users have many courses courses has many newsposts, newsposts has many courses users has many newsposts, newsposts has many users i'm using entity framework code first .net web api, sends entities in form of json. when try course, sends json result relations of entites, fine, wish set limit of how many levels serializes not serialize relations beyond first or second level. get course/ serialized to: { "users":[{ "id":1, "newsposts": [{ "id":1, "message":"foo" }] }], "newsposts":[{ "id":2, "message":"bar" }] } what want

asp.net - Problems with web.config and site.map -

i'm having problems 1 page, i've page on web.config , site.map deny "*", if write url page still open... like : site.map <sitemapnode url="" title="" roles="regrateste" description="my page"> <sitemapnode url="~/telateste.aspx" title="tela teste" description="tela de teste" roles="regrateste" deny ="*"/> web.config <location path="/telateste.aspx"> <system.web> <authorization> <allow roles="regrateste" /> <deny users="*" /> </authorization> </system.web> </location> there wrong code? this page supposedly not open if user not have role: regrateste. thanks.

javascript - Merging Event definitions for mixins and Views backbone.js -

i've created mixin backbone , i'm wondering if there better way merge events hash. mixin: app.mixin.filter = { events: { 'click .label': 'toggle', 'keyup .file-search': 'updatesearchfilter' }, //more stuff } view: app.dashboardview = backbone.view.extend({ el: '.contentwrap', dashevents: {'click .project-btn': 'addprojectmodal'}, initialize: function() { //other stuff _.defaults(app.dashboardview.prototype.events, this.dashevents); //other stuff } } _.extend(app.dashboardview.prototype, app.mixin.filter); i'm particularly not happy calling event hash dashevents. there way can keep events 'events'? or there standard pattern handle kind of issue? app.dashboardview = backbone.view.extend({ el: '.contentwrap', events : _.extend({}, app.mixin.filters.events, { 'click .project-btn': 'addprojectmodal' }) }

html - Can't call method "setValue" on an undefined value - perl -

use strict; use warnings; use utf8; use 5.010; use html::html5::parser; open (file, '<links.txt') ; @lines = <file>; $i; $a = $lines[$i]; $xml = html::html5::parser->load_html(location => $a) ; got error: "can't call method "setvalue" on undefined value @ c:/dwimperl/perl/site/lib/ html/html5/parser/tagsoupparser.pm line 2946" i've tried insert if , define value first doesn't work. i'm @ beginning of learning perl, here me this? use strict; use warnings; use utf8; use 5.010; use html::html5::parser; use try::tiny; open (my $file, '<', 'links.txt') ; @lines = <$file>; $i = 0; foreach $a (@lines) { $xml = try { html::html5::parser->load_html(location => $a) } catch { warn "bad line [$i][$a]"; warn "actual error: $_"; }; $i++; } i've cleaned code best guess how it's supposed structured, , added try/catch bloc

How to send double byte char to DB2 from .net provider? -

i conversion error ibm iseries .net provider when calling rpg/db2 stored procedure passing param contains double byte char. same procedure if pass normal text. don't think if sending different data type in parameter list need different procedure matching parameter types?

ruby - Regex put in via formtastic gets altered (maybe by the controller) before it's put into Mongoid -

i have form put in hashes regular expression values. problem gets messed when travelling view, through controller , mongodb mongoid. how preserve regex'es? input examples: {:regex1 => "^something \(#\d*\)$"} {:regex2 => "\a[\w+\-.]+@[a-z\d\-.]+\.[a-z]+\z"} my formtastic view form looks this: = semantic_form_for resource, :html => {:class => "form-vertical"} |r| = r.inputs = r.input :value, :as => :text = r.actions = r.action :submit my controller create action takes in params , handles this: class emailtypescontroller < inheritedresources::base def create puts params[:email_type][:value] # => {:regex1 => "^something \(#\d*\)$"} , # {:regex2 => "\a[\w+\-.]+@[a-z\d\-.]+\.[a-z]+\z"} puts params[:email_type][:value].inspect # => "{:regex1 => \"^something \\(#\\d*\\)$\"}" ,

ejb 3.0 - Error on JMS Queue because of destination in websphere used by Message Driven Beans -

i getting following error: application ebs_calc#ebs_calc_ejb.jar#mbintegrations has , usejndi, there no corresponding property on activationspec class jms/asqueue(com.ibm.ws.sib.api.jmsra.impl.jmsjcaactivationspecimpl) of resourceadapter cells/uswsa0102235node01cell/nodes/uswsa0102235node01/servers/server1/resources.xml#j2cresourceadapter_1364909976437. property ignored. may have undesirable effects. activationspe w j2ca0161w: type of object referred supplied destination jndi name wrong. object must implement javax.jms.destination. destination jndi name was: jms/asqueue. supplied objects class was: {1} activationspe e j2ca0137e: activationspec validate() method failed invalidpropertyexception. activationspec jms/asqueue (com.ibm.ws.sib.api.jmsra.impl.jmsjcaactivationspecimpl), belongs installed resourceadapter cells/uswsa0102235node01cell/nodes/uswsa0102235node01/servers/server1/resources.xml#j2cresourceadapter_1364909976437 , associated mdb application ebs_calc#ebs_calc_

android - Error in getting a response from web service -

i created android app must connect web service (created me), stores in database (hosted in site of free hosting). web service takes latitude , longitude , text store in db , works great if use it. but can't use web service android app. here code: package com.example.mobile; import java.io.ioexception; import org.ksoap2.soapenvelope; import org.ksoap2.serialization.soapobject; import org.ksoap2.serialization.soapprimitive; import org.ksoap2.serialization.soapserializationenvelope; import org.ksoap2.transport.httptransportse; import org.xmlpull.v1.xmlpullparserexception; import android.os.bundle; import android.app.activity; import android.content.intent; import android.util.log; import android.view.menu; import android.view.view; import android.view.view.onclicklistener; import android.widget.button; import android.widget.textview; import android.os.asynctask; public class webserviceactivity extends activity implements onclicklistener { public final static string

tfs2012 - Force TFS to detect changes -

seems should simple, can't find how this... i made changes several files spread within repo using script wrote. problem tfs in infinite wisdom not think files have changed. aside manually finding each file , clicking "checkout editing" there way tell tfs rescan , detect changes? a folder compare (file->source control->compare...) should trick. select top folder start comparison, , select compare latest version. result hould show files changed, , whether checked out or not.

Handling textbox .change when using JQuery UI Autocomplete widget -

i have search box jquery ui autocomplete function. want terms entered user compared against set of cases (see "kittens" , "puppies" in switch statement below. see jsfiddle here: http://jsfiddle.net/xcbmq/4/ ). this existing code works if user types entire word "kittens": $('#change').text("nothing entered yet") var $typeahead = new array ("kittens","puppies","giraffe","trucks"); $('#query').autocomplete({source: $typeahead, autofocus: true}).change(function() { var text = $(this).val().tolowercase(); switch (text) { case "kittens": $('#change').text("kittens"); break; case "puppies": $('#change').text("puppies"); break; default: $('#change').text("neither kittens nor puppies"); break; } }); but if user takes advantage of aut

angularjs - How do I store angular directive in a scope variable? -

i implementing form builder in angularjs , need insert , reorder directives @ runtime. don't know start looking - examples seem demonstrate static tree of directives. 2 options achieve dynamic behaviour are: a) compiling , inserting templates on fly , b) using huge ng-switch of possible directives. both ways ugly. can suggest better implementation? below js , html code how think formbuilder should in ideal world, please me fill in 3 instances of todo. jsfiddle javascript: angular.module('components', []) .directive('checkbox', function() { return { restrict: 'e', template: '<div class=f><input type=checkbox>{{name}}</input></div>' }; }) .directive('textfield', function() { return { restrict: 'e', template: '<div class=f><input type=text placeholder="{{name}}"></input></div>' }; }) function formbuilder($scope,

Setting up Maven to allow deployment to different repositories easily -

i'm working in environment define rules lot of people. use hudson , artifactory, , want evaluate if switch jenkins , nexus worth migration cost (but not question). to eval it, have setup maven, jenkins, , nexus locally, , try find setup use of previous setup, can compare solutions. problem here is: when use existing pom , build , deploy through jenkins, automatically deployed our old environment. i have tried define deploymentmanagement section in .settings file in maven, not allowed (see configuring maven , there note: installation , user configuration cannot used add shared project information - example, setting or company-wide. i of course copy whole, , change distributionmanagement inside each pom, use same (not copied) example in different installations. our current root pom contains following section: <distributionmanagement> <repository> <uniqueversion>false</uniqueversion> <id>company-central</id>

knockout.js - Knockoutjs - .sort() sorting in reverse order in Safari -

in knockout view model have following: this.files.sort(function(f1, f2) { if (mostrecentfirst) { return f1.creationdate < f2.creationdate ? -1 : 1; } else { return f1.creationdate > f2.creationdate ? -1 : 1; } }); in firefox, chrome , ie sorts expected. but in safari sorts in reverse order. any suggestions why happening? update: creationdate property contains json date string, eg "2013-04-26t12:08:02". update 2: i've got around problem using push or unshift add elements array, isn't great solution because assumes data presented has been ordered. it's no longer immediate problem i'd still know why safari sorting in reverse order.

c++ - Static Library - Static library using own Qt .so file -

i want compile static library qt project version 4.7.4. whatever i'm changing in .pro file not affecting on changes. want change example libqt5gui.so point on /opt/vendor/extlib/libqt5gui.so , i'm not lucky @ moment: i'm copying files ubuntu virtual machine on cleanly installed xubuntu 13.04. when i'm using ldd command returns: marin@host:~/some_dir/test$ ldd ./project02 linux-gate.so.1 => (0xb76e7000) libqt5widgets.so.5 => /usr/lib/i386-linux-gnu/libqt5widgets.so.5 (0xb70c6000) libqt5xml.so.5 => /usr/lib/i386-linux-gnu/libqt5xml.so.5 (0xb708a000) libqt5gui.so.5 => not found libqt5core.so.5 => not found libstdc++.so.6 => /usr/lib/i386-linux-gnu/libstdc++.so.6 (0xb6fa0000) libgcc_s.so.1 => /lib/i386-linux-gnu/libgcc_s.so.1 (0xb6f83000) libc.so.6 => /lib/i386-linux-gnu/libc.so.6 (0xb6dd0000) libqt5gui.so.5 => not found libqt5core.so.5 => not found libpthread.so.0 => /lib/i386-linux-gnu/libpthread.so.0 (0xb6db4000) libgobject-

playframework - Validate javax.validation.* annotated object from external jar in Play Framework 1.2.5 -

i have entity class has jsr303 validation annotations. compiled against hibernate-validator, packaged in jar using maven. i have play 1.2.5 app includes jar, , pass class controller argument annotated @valid. play not seeing of validation errors. possibly problem caused way packages set up? cheers nic

binding - How to edit the bind data in GridView using asp.net MVC? -

i have bind data using grid in asp.net mvc3. have problem in edit link in bind table. if click on edit link it's not responding. here's have: teacher.cs public class teacher { public static list<teacher> getlist { get; set; } public int t_id { get; set; } public string t_name { get; set; } public string t_address { get; set; } public string sub_id { get; set; } } teachercontroller public actionresult edit(int id,string t_name,string t_address,string sub_id) { // teacher list= new teacher(); var edit = editlist(); //list.t_id = convert.toint32(t_id); return view(edit); } [httppost] public actionresult editlist() { var editlist = new list<teacher>(); using (sqlconnection conn = new sqlconnection(@"integrated ecurity=sspi;persist security info=false;initial catalog=demo;data source=cipl41\sqlexpress")) { conn.open(); var modeledit = new teacher(); sqlcommand cmd

extjs - Sencha touch 2: Set button handler parameter to lunch javascript function -

i using sencha touch o'really example. conference have sessions , speakers associated. imagine have session list when tapped view change session details. i have view this: ext.define('myapp.view.session.detail', { extend: 'ext.container', xtype: 'session', config: { layout: 'vbox', title: '', items: [ { flex: 1, layout: 'fit', scrollable: 'vertical', xtype: 'sessioninfo' }, { flex: 2, xtype: 'speakers', store: 'sessionspeakers', items: [ { xtype: 'listitemheader', cls: 'dark', html: 'speakers' } ] }, { flex: 1, xtype: 'button', text: "decline button" , ha

sql server - SSRS date issue -

i have query used in ssrs reports summary , detail view in sql server 2008. problem having cannot date range calculate correctly. query: declare @fromdate date select [abs] = case when left(filename,2)='ba' 'bags' when left(filename,2)='sx' 'socks' else 'apparel' end, left(filename,(charindex( '_', filename, charindex( '_', filename)+1)-1)) [material], filename, convert(varchar(50),delvd_dt,1) dd, fulfillment_type vw_delivery_log where(charindex( '_', filename, charindex( '_', filename)+1)-1)>0 , delivered_to_ftp <> 6 , fulfillment_type <> 'redrop' , (convert(varchar(50),delvd_dt,1) > @fromdate ); i have @fromdate variable datetime variable in ssrs. when add line @ before select statement "set @fromdate = '4/1/2013' query produces expected results, without query produces no results. i have tried converting @fromdate variable date using convert

removing item from comboBox if it matches a cetain cell in dataGridView in VB.net -

i have list of names (employees) in combobox use add datagridview. i'm trying make once employee in database , displayed in datagrid, name removed combobox not appear available add datagrid. code i've written task looks should work, doesn't. public class main public techphones new phonesdataset.techcompanyphonesdatatable public techphonestableadapter new phonesdatasettableadapters.techcompanyphonestableadapter public employees new phonesdataset.employeesdatatable public emptableadapter new phonesdatasettableadapters.employeestableadapter private sub form1_load(byval sender system.object, byval e system.eventargs) handles mybase.load, mybase.activated loadform() end sub private sub cboemployee_selectedindexchanged(byval sender system.object, byval e system.eventargs) handles cboemployee.selectedindexchanged lbloffice.text = "office: " + cboemployee.selecteditem("office") lblphone.text = cboemployee.selecteditem("phone")

.net - Retrieve Image from URL in Silverlight -

i have image in silverlight application , want source come url. create uri , create bitmapimage , set it's urisource uri. think set image's source bitmapimage. when this, in debug mode, can see properties of images source, not display on ui. how bind image's source url in silverlight? (note: url of png image) your problem can caused cross site scripting limitation. Ä°f so, can develop proxy handler (ashx) on web project xap hosted. handler can take outer url get/post parameter , download image on server , writes response binary allow silverlight project origiated url.

Delet multiple files with same name via SSH -

i in public_html dir , when executing rm filename.php it removes file in public_html dir , but in on 80 sub dirs have , need remove same file . what command that? assuming qualified name of directory, how about: find /var/public_html -name "filename.php" -exec rm -rf {} \;

MySQL transactions: reads while writing -

i'm implementing paypal payments standard in website i'm working on. question not related paypal, want present question through real problem. paypal can notify server payment in 2 ways: paypal ipn - after each payment paypal sends (server-to-server) notification url (choose you) transaction details. paypal pdt - after payment (if set in pp account) paypal redirect user site, passing transaction id in url, can query paypal transaction, details. the problem is, can't sure 1 happens first: will server notified ipn will user redirected site whichever happening first, want sure i'm not processing transaction twice. so, in both cases, query db against transaction id coming paypal (and payment status actually..but doesn't matter now) see if saved , processed transaction. if not, process it, , save transaction id other transaction details database. question what happens if start processing first request (let pdt..so user redirected site, server wasn&

Windows tool to check for used files (by Java OSGi process) -

i'm looking tool that'll give me information file operations (e.g. open/close/read/write, how many bytes, how many time waited), filtered process , that'll allow me have file information incremented few hours. right i'm using process monitor information show it's moment, doesn't save later use. application profile it's osgi server, i've tried jprofiler gives me "this probe it's not available in attach mode", don't know why. if app runs on windows (x86 or x64), try tool, d probe has build-in file system filter, can examine, query, filter, save captured records, profile page has download link, btw, it's free.

html - trying to write @media screen if screen size is 768px iPad portrait view, then right column stack down -

i designing playing around bootstrap fluid layout. here design: http://www.getaveo.com/_bootstrap4/_delete.html i have: span3 (gray) span6 (orange) span3 (red) i happen... 1 of 2) trying write @media screen if screen size 768px ipad portrait view, then: right column, span3 (red) stack down, , becomes 100%. orange column, span6 (orange) expands on or widen on more right edge. or span6 becomes span9. left column, span3 (gray) stays same. or becomes this: http://www.getaveo.com/_bootstrap4/_delete2.html 2) view _delete html again... make browser window smaller 480px wide or smaller, span stacks this: gray orange red what is: if screen size iphone landscape view 480px or smaller, then, order should be: orange gray red there few different ways solve this.. 1] responsive utility classes if have 1 use case entire site use .visible-tablet , .visible-phone , etc.. classes explained here . downside here heavy html, it's simple do. working example: htt

CSS float property on an iframe, widely supported? -

Image
<iframe id="dropdownlist" style="height:27px; float:right;" src="http://www.a.com/a.html"></iframe> example: http://www.w3schools.com/tags/tryit.asp?filename=tryhtml_iframe_align_css i've never used property iframe, pictures, , need use now. tested on opera, chrome, firefox, safari , ie10 , worked. i'm not worried older browsers, how supported property iframes? or since css, should work same (picture or iframe) regardless? i can't think of issues floating iframe personally. if want sure create quick sample page (or use existing one ) , run through browsershots.org .

JavaFX Charts: Change the ChartType of the XYChart at runtime? -

i want change type of chart being displayed e.g. linechart extends xychart , areachart extends xychart . can switch linechart drawn areachart @ runtime? for xychart, direct known subclasses: areachart, barchart, bubblechart, linechart, scatterchart, stackedareachart, stackedbarchart any great! thanks. charts show information according list of data, , according settings of chart , of 2 axes. charts don't modify list of data. so, have put list of data 2 charts, make 2 pairs (or 1 pair, if applicable) of axes, , phisically exchange chart @ specific location in scenegraph. it theory, should work. if doesn't work in practise - should investigated (possibly, bug). there no trouble show info in several charts , replace charts.

objective c - Cannot change mutable array? -

ok have been stuck on while though it's simple problem, trying add nsdictionary array when calling addobject method on array program crashes claiming sending mutating method immutable object. my code looks like: - (ibaction)btnsavemessage:(id)sender { //save message , clear text fields nsmutabledictionary *newmessagedictionary = [[nsmutabledictionary alloc] init]; [newmessagedictionary setobject:@"plist test title" forkey:@"title"]; [newmessagedictionary setobject:@"plist subtitle" forkey:@"subtitle"]; [newmessagedictionary setobject:@"-3.892119" forkey:@"longitude"]; [newmessagedictionary setobject:@"54.191707" forkey:@"lattitude"]; nsmutablearray *messagesarray =[[nsmutablearray alloc]init]; //load plist array nsstring *messagespath = [[nsbundle mainbundle] pathforresource:@"messages"

linux - Java JSch changing user on remote machine and execute command -

i'm trying connect host, change user using "su - john" , execute command john. possible using jsch? the problem after create session , open channel , execute aforementioned command should request password, nothing happens. this how connect remote machine: string address = "myremote.computer.com"; jsch jsch = new jsch(); string user = "tom"; string host = address; string password = "l33tpassw0rd"; session session = jsch.getsession( user, host, 22 ); java.util.properties config = new java.util.properties(); config.put( "stricthostkeychecking", "no" ); session.setconfig( config ); session.setpassword( password ); session.connect(); then execute commands via runsshcommand() method looks this: try { channel channel = session.openchannel( "exec" ); channel.setinputstream( null ); channel.setoutputstream( system.out ); ( (channelexec) channel ).setcommand( command ); channel.connec

c - Python SWIG bindings with SomeType ** as function argument -

i couldn't find working python bindings ffmpeg, decided generate 1 swig. generation quick , easy (no customization, default swig interface), these problem using functions int avformat_open_input(avformatcontext **ps, const char *filename, avinputformat *fmt, avdictionary **options); libavformat/avformat.h . using c can run by: avformatcontext *pformatctx = null; int status; status = avformat_open_input(&pformatctx, '/path/to/my/file.ext', null, null); in python try following: >>> ppmpeg import * >>> av_register_all() >>> formatctx = avformatcontext() >>> formatctx <ppmpeg.avformatcontext; proxy of <swig object of type 'struct avformatcontext *' @ 0x173eed0> > >>> avformat_open_input(formatctx, '/path/to/my/file.ext', none, none) traceback (most recent call last): file "<stdin>", line 1, in <module> typeerror: in method 'avformat_open_input', argument 1 of

objective c - Can't access to extern variable from another class -

i've created phonegap plugin give variable native code. works fine. need access value other classes decided create extern nsstring. .h extern nsstring *lkwid; @interface myplugin : cdvplugin { } @property (retain, nonatomic) nsstring *lkwid; -(void) setmyvalue:(nsmutablearray*)arguments withdict:(nsmutabledictionary*)options; .m #import "myplugin.h" @implementation myplugin @synthesize lkwid; nsstring *lkwid = @""; -(void) setmyvalue:(nsmutablearray*)arguments withdict:(nsmutabledictionary*)options { nsstring* callbackid = [arguments objectatindex:1]; lkwid = callbackid; nslog(@"set value %@ ",lkwid); //nslog shows correct value javascript } now want access lkwid mainviewcontroller.m (myplugin.h imported) lkwid empty. why? i think confusing instance variables , static (class) variables. extern nsstring *lkwid declares globally accessible variable. @property (retain,nonatomic) nsstring *lkwid declar

Compare object attributes with array of objects Ruby on Rails -

i have object want compare array of objects. if 2 specific attributes equal want stop loop. how can that, or how can in better rails way? @item #item compare @items.each |item| if ( (item.att1 == @item.att1) && (item.att3 == @item.att3) ) is_equal(item.id) else #do end end use find method of array: matched_item = @items.find { | item | item.att1 == @item.att1 && item.att1 == @item.att1 } is_equal(matched_item.id)

php - Couldn't display a second word in my database output -

i have strange problem here. i'm doing admin page edit movie info. have movie exemple called "blood diamonds" in database, on oage show "blood" without second word "diamonds", couldnt find whyyy. require('../classes/movie_class.php'); $moviecinemas = movie::get_movie_info( $_get['movie_id']); foreach ($moviecinemas $movie) { $movie_id = $movie['movie_id']; $movie_name = $movie['movie_name']; $movie_category = $movie['movie_category']; $movie_display = $movie['movie_display']; echo "<input name='movieid' type='hidden' id='movieid' value=" . $movie_id . '><br/>'; echo "movie name :"; echo "<input name='moviename' type='text' id='moviename' value=" . $movie_name . '><br/>'; echo "movie category :"; echo "<input name='moviecate

jms - Need help to handle MDB Exception in two ways -

i'm trying handle 2 different types of problems while processing message. the first problem if remote database down. in case, message should stop processing, , try again later. message should never go dlq, , should keep trying until remote database up. the second problem when there problem message. in case, should go dlq. how should structuring following code? @override public void onmessage(message message) { try { // processing messageprocessing(message); // should dlq if message bad // save database putnamedlocation(message); // <<--- exception when external db down } catch (exception e) { logger.error(e.getmessage()); mdc.setrollbackonly(); } } assuming can detect bad messages definitively in code body of mdb, write bad messages dlq directly. gives bit more freedom perhaps categorize error , optionally send different types of bad messages different "dlq-like" queues, and/or apply time-to-li