Posts

Showing posts from March, 2010

How to prevent an empty form submission into CakePHP 2.5.2 -

i new cakephp, how can use javascript prevent form being submitted empty, mean fields empty ? the user hit submit button i using cakephp 2.5.2 you don't need javascript such minor blank validation stuff. go through validation section. check out example below: model: user.php has following validation code email field. class user extends appmodel { public $validate = array( 'email' => array( 'required' => true, 'allowempty' => false, 'message' => 'email cannot empty.' ) ); setting required true, , allowempty false job you. also, "message" field acts icing on cake indicates error message shown when validation fails. peace! xd

reportbuilder3.0 - MS Report Builder Subreport returning same record for each separate record on main report -

i have researched topic, responses have not seemed help. set report in microsoft sql report builder (i doing widgets, not code). set sub-report. the sub-report has parameter , filter refers parameter. the main report has parameter refers identifier ties 2 reports (employee id). i have used sub-report properties after embedding sub-report set parameter of 2 parameters (main , sub) matching. what getting in main report correct main report, sub-report repeats first person (on main report)'s information on each separate page of report. (the report grouped employee id , have page break after each group.)

hibernate - Mapping association with Composite-id -

i'm new on hibernate, i've doubt how can represent case: -->table message: - (pk) msgsender -> foreign key table 'user' - (pk) msgdestination -> foreign key table 'user' - (pk) msgdatesend - msgcontent - isreaded -->table user -(pk) username - ... this message.hbm: <?xml version="1.0"?> <!doctype hibernate-mapping public "-//hibernate/hibernate mapping dtd 3.0//en" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd"> <hibernate-mapping> <class name="message" table="message"> <composite-id name="id" class="messageid"> <key-many-to-one name="msgsender" class="user"> <column name="msgsender"/> </key-many-to-one> <key-many-to-one name="msgdestination" class="user"> <column name=&q

java - Grayed out option in popupmenu -

i'm building eclipse plugin. when right click on items in table popup menu selections pops up. want selection grayed out if more 1 items selected. have tried using enablesfor="1" in action tag in plugin.xml file. <extension point="org.eclipse.ui.popupmenus"> <objectcontribution id="se.myproject.xxxxxx.ui.replaceitemasreference" objectclass="se.xxxxx.xxxx.core.xxxxx.entityitem"> <action class="se.myproject.xxxxxx.ui.views.referenceaction" enablesfor="1" id="se.myproject.xxxxxx.ui.views.replaceitemasreference" label="do stuff" menubarpath="additions-ext"> </action> </objectcontribution> </extension> but it's not graying out selection. wonder if have additional coding achieve this? i want result this!

ios - Apple pay sandbox environment testing without any 3rd party payment processor -

is there way test apple pay in sandbox environment? can test dummy data or cut money real card? i have gone through 2 payment sdk 1 stripe , other braintree stripe providing sandbox environment in link . i have ecommerce store app in m using apple pay. please suggest. i did implement pay in shopping app using braintree . you're aware when use braintree, got sandbox environment, , production environment. apple pay match behavior, you'll have generate 2 mechantid, 1 sandbox, , 1 prod. in braintree, you'll link sandbox mechantid in braintree sandbox dashboard, , prod merchantid in braintree production dashboard. in app, you'll need have (at least) 2 builds configuration, 1 sandbox/debug, 1 production/release. you'll create mechantid constant that: #if config_release static nsstring *const merchantid = @"merchant.com.yourappname.braintree"; #else static nsstring *const merchantid = @"merchant.com.example.braintree"; #endi

vba - Hide column in excel by date YYYY MM for the rest of this year plus three more -

Image
i'm trying hide columns in excel vba. so far have hide after 36 months told needed rest of forecasted year plus 3 years hide months in year 4 , 5 except december. i added picture of spreadsheet cells except input, cells c10 thru bj12 , row 6, come second page of workbook. in row 6 trying take year row 9 , use way, can hard coded in must dynamic because startyear changes second page depending on scenario , job selected. 'hide months except december after 36 months range("am:bj") .entirecolumn.hidden = true each cell in range("am7:bj7" & activecell.specialcells(xlcelltypelastcell).column) select case cell.value case = "currentyear" case = "12" cell.entirecolumn.hidden = false end select next cell end try this! code should keep columns unhidden until 3 years after starting year. should hide columns except december months. 'grab starting inf

Getting Php Curl Error -

i want grab first 10 results of url passed function parameter ..and want make data scraper sites getting syntax error when print result on screen syntax error on line don't why giving me syntax error kindly me.... print_r( $dse->crawl()->parse() ); <?php class curl_crawler{ public $url; public $request_type; public $data; public $post_params; function __construct($url = '' , $request_type = 'get') { $this->url = $url; $this->request_type = $request_type; $this->data = ''; $this->post_params = array(); } /**crawl document **/ function crawl() { $curl = curl_init( $this->url ); curl_setopt($curl, curlopt_header, false); curl_setopt($curl, curlopt_timeout, 60); curl_setopt($curl, curlopt_useragent, 'curl php'); curl_setopt($curl, curlopt_returntransfer, true); $this->data = curl_exec($curl); curl_close($curl);

php - Facebook: open graph checkins in on one map -

Image
i have open graph feature in app. have maintain total check-ins in facebook account. , have show checked-in places in 1 map. foursquare app used in app. don't know, how implement that. they have used 2 ways of showing in aggregation, first 1 is, and second 1 is, so, have both foursquare app. please me in this. thanks in advance!!! they using map custom aggregation feature. check out documentation here: https://developers.facebook.com/docs/opengraph/guides/collections/#styles . you'll need attach location data actions in order aggregation work. can learn more place property @ https://developers.facebook.com/docs/opengraph/guides/tagging/#places

Webpack with typescript external commonjs module -

in order code below work, need either repeat require('./rolesservice') clause in rolesview.ts , or uncomment console.log statement. if have neither of lines, webpack not include referenced rolesservice.ts in bundle, resulting in missing rolesserviceprovider error. think know why, since rs not used, except type references disappear once transpiled es5, webpack must optimizing import away. there way not have repeat require('./rolesservice') twice. rolesview.ts: "use strict"; import angular = require('angular'); import rs = require('./rolesservice'); require('./rolesservice'); //console.log( rs); class rolesviewcontroller { static $inject = ['rolesservice'] constructor(private rolesservice: rs.irolesservice) { rolesservice.getroles(); } } angular.module('epsr').component('rolesview', { template: require('./rolesview.html'), controller: rolesviewcontroller }); r

Retrieving number of likes to a particular facebook page in android app -

i want create simple "about us" page in android app user can go facebook page have more information application. have done through hyperlink unable fetch number of likes facebook page using hyperlink. have searched solution everywhere got suggestion install "facebook sdk" tedious & lengthy procedure when want have number of likes on page. don't want integrate facebook in app provide user facilities fb login or status update through app etc. & simple requirement fetch number of likes on page there simple way or have go installing facebook sdk. please help... just simple http request following url: https://graph.facebook.com/fql?q=select%20url,%20normalized_url,%20share_count,%20like_count,%20comment_count,%20total_count,%20commentsbox_count,%20comments_fbid,%20click_count%20from%20link_stat%20where%20url=%27http://www.stackoverflow.com%27 change http://www.stackoverflow.com whatever page want check. the above url return this: { &

ios6 - iOS Calendar restriction caused app to crash -

this scenario: i adding event ios calender app. before adding event (add event view of calendar being shown ), if user go settings-->general-->restrictions-->calendar , restrict app's permission app crashes. have came across issue this? leads? because xcode isn't giving relates log while crashing. running app in ios 6.0 ipod touch. hope can help. first permission access calendar events , add event. code permission ekeventstore eventstore = [[ekeventstore alloc] init]; if ([eventstore respondstoselector:@selector(requestaccesstoentitytype:completion:)]) { [eventstore requestaccesstoentitytype:ekentitytypeevent completion:^(bool granted, nserror *error) { if (granted){ mllog(@"wipe : geteventstorepermission : permission granted"); } else{ mllog(@"wipe : geteventstorepermission : permission not granted"); } }]; } else{ mllog(@"wipe : geteventst

SQL Server-Query to traverse rows of table and updating sequentially -

i have leave table in following format: ╔════╦═══════════╦═════════════════════╦═════════╦══════════╗ ║ id ║ available ║ maximumaccumulation ║ availed ║ priority ║ ╠════╬═══════════╬═════════════════════╬═════════╬══════════╣ ║ 1 ║ 10 ║ 4 ║ 0 ║ 1 ║ ║ 2 ║ 15 ║ 5 ║ 0 ║ 2 ║ ║ 3 ║ 8 ║ 3 ║ 0 ║ 3 ║ ╚════╩═══════════╩═════════════════════╩═════════╩══════════╝ now, if user apply 10 leaves leaves must start deduct first row(till maximumaccumulation limit), after deduction if still user has leaves left accumulated(in our case still left 6 leaves) should deducted next row. process go on until rows have been traversed. if still left leaves, new row has inserted in table with: id: 0, available: 0, maximumaccumulation: 0, availed(whatever left) priority: 0 in our case output be: ╔════╦═══════════╦═════════════════════╦═════════╦══════════╗ ║ id ║ available ║ maximumacc

VB.NET Excel file not connecting with virtual datagridview -

i trying write module in vb.net application, isn't working properly. trying create datagridview, , load excel file it. however, excel isn't loading in it. code below imports microsoft.office imports microsoft.office.interop imports system.data.oledb imports system.net.mail module m_islshpptsplit dim uploadfilepath string dim uploadfilename string dim dgv1 datagridview dim dgv2 datagridview public sub loadfile() dgv1 = new datagridview dgv2 = new datagridview try dim filedialog openfiledialog = new openfiledialog() dim path string filedialog.title = "select file" filedialog.initialdirectory = "desktop" filedialog.restoredirectory = true if filedialog.showdialog() = windows.forms.dialogresult.ok path = filedialog.filename else path = nothing end if uploadfilepath = filedialog.filename uploadfilename = system.io.path.getfilename(filedia

clojure - LightTable creates connection per file -

how can tell lighttable connection use evaluate code? before latest version, created 1 connection upon first evaluation , used connection subsequent evals. creates connection per file evaluate form in + if launch instarepl, creates new connection :( if use remote repl, connects repl successfully, still creates new connections each clojure file( you didn't versions represented 'before' , 'after'. if you've moved lighttable 0.8.x should update clojure plugin 0.3.2. fixes problem described in changelog .

unity3d - How to make class that can be edited in inspector? -

previous workflow had code this: public class activityclass : monobehaviour { [system.serializable] public struct activites { public string name; public weaponclass weapon; public bool hasownactivities; [hideininspector] public int numb; public conditionclass.conditions why; public actionclass.act[] what; public int timetoreverse; public actionclass.act[] whatif; public animatclass.animat[] howlook; public statsclass.stats sowhat; public int actmode; public int employ; public bool change; public bool chosen; public int timeofaction; public int timer; } } of course, looks bad practice, allowed setting these values in editor (there monobehavior descendant has list of activityclasses). how can code turned normal class still editable in editor? removing struct lines makes editor request reference, , not set values. i not entir

javascript - Get number of elements inside of an element in xml with jQuery -

i have xml file: <row> <question name="faq"></question> <answer name="faq"></answer> <question_down name="faq"></question_down> <answer_down name="faq"></answer_down> <question_down name="faq"></question_down> <answer_down name="faq"></answer_down> <question_down name="faq"></question_down> <answer_down name="faq"></answer_down> </row> i want know how many <question_down> elements have inside <row> , how can using jquery or pure javascript? you can use jquery's .find() method here find specific elements within element. here want find <question_down> inside <row> question_down_num = $("row") //any <row> element .find("question_down") //find element called <question_down> i

c# - How to update ArrayList to match user-ordered TreeView -

i have gtk treeview displaying list of items in arraylist . treeview set reorderable, user can drag , drop items in list re-order them. my question is, how update original arraylist match new treeview ordering once reordering has taken place? i have managed come solution - code below prints out items in list; can see how doing can find correct index items , reorder them in associated arraylist. treeiter iter; yournodeview.model.getiterfirst (out iter); (int = 0; < yournodeview.model.iternchildren(); i++) { string result = ((typeoflistitem)sequencernodeview.model.getvalue (iter, 0)).tostring(); //here add typeoflistitem instance new arraylist, , after loop swap out old arraylist new one. console.writeline("print item "+result); yournodeview.model.iternext(ref iter); } the typeoflistitem of course time. have written class called mylistitem has parameters such title

jsf - Disable a4j:status for only h:inputText component but not other components -

i have following code <a4j:status id="commonstatus" onstart="#{rich:component('loading')}.show();" onstop="#{rich:component('loading')}.hide();" /> <rich:datatable id="dtable" rerender="ds"> <rich:column id="name" filtermethod="#{mybean.filtername}"> ... <h:inputtext> <a4j:support event="onkeyup" rerender="dtable, ds" ignoredupresponses="true" requestdelay="700" oncomplete="setcarettoend(event);" /> </h:inputtext> ... <rich:datascroller id="ds" rerender="dtable"> ... <a4j:support event="onchange" rerender="dtable, ds" status="commonstatus" /> ... </rich:datatable> <rich:modalpanel id="loading" moveable="false" autosized="true"> <h:panelgrid columns="2"> <h:graphicimage value="

automation - Automating Google BigQuery query without local access to APIs -

i'm trying automatically run bigquery query every week , save data onto computer. ideally done through apis due issues proxies , firewalls in work cannot access apis on computer. are there other options available me? have tried looking google compute engine i'm not quite sure if me it necessary data bigquery well, standard gap reporting through webui not suffice. , query result in ~ 2,000,000 rows of data each week as might know, bigquery doesn’t provide scheduling mechanism. should use 3rd party solution or develop own. example, can use app engine cron service automate bq query execution , exporting result gcs. https://cloud.google.com/appengine/docs/java/config/cron https://cloud.google.com/appengine/features/#cron https://cloud.google.com/bigquery/bigquery-api-quickstart to result gcs local computer still need sort of access cloud , use respective tool (see link below) https://cloud.google.com/storage/docs/gsutil

php making query from mysql database getting error like Unknown column in 'where clause' -

i have piece of code in php make query mysql database if(isset($_session["esb2b_userid"])){ $check_row = mysql_num_rows(mysql_query("select * esb2b_basket es_session='.$site.' , es_uid=".$_session["esb2b_userid"]) or die(mysql_error())); echo "logged in <b>" . $_session["esb2b_username"] . "</b>" ; ?> <? }else{ ?> <? echo "$to" ?> our website <? } ?> <? if($_session['esb2b_userid']=='') {?> <span id="log-info"><a href="<?=$domain_url?>/signup.html"><? echo "$join_free" ?></a><?php }?> | <? if($_session['esb2b_userid']=='') {?> <a href="<?=$domain_url?>/signin.php?file="><? echo "$sign_in" ?></a><?php } else { ?><a href="<?=$domain_url?>/logout.php&q

Matlab GUI Scrollbar Available -

does know if can make horizontal , vertical scroll bar in matlab gui (not list box)? depending on resolution of computer may or may not show of figure need able scroll (horizontally in case). how that? this create figure horizontal scrollbar: figure plot(1:3); b = uicontrol('parent',gcf,... 'style','slider',... 'units','normalize',... 'position',[0,0,1,0.05],... 'min',0, 'max',1,... 'value', 0); however, if you, rather make sure figure fits screen , allow user zoom. having graph larger screensize deprives user observing entire graph @ once. you a) let matlab choose default figure size of figure. user can fullscreen if desired, or b) screensize = get(groot,'screensize'); figure('position',screensize) i hope helps.

amazon web services - Dockerfile vs Dockerrun.aws.json on AWS Elastic Beanstalk -

can explain use cases using either or both of these in eb project? understand docs using 1 makes other optional, i'm not clear on pros vs cons. scenarios using both? eb app, i'm building docker image manually through dockerfile (not repo) , launching node.js server.

javascript - How do I make a To-Do List, and at 0 elements unchecked remaining to show a button -

i have to-do list made in html, css , javascript, , want show button if 0 elements unchecked remaining. think code should contain variable named "numremaining". have tried in jquery, total failure. this have tried: $(".todo-checkbox").change(function(){ if($(".todo-checkbox:checked").length > 4){ $("#yourbutton").show(); } }); this code: <html> <head> <link rel="stylesheet" href="tomo.css"> <title>tomo</title> </head> <body> <h1>tomo</h1> <center> <div id="todo-app"> <label class="todo-label" for="new-todo">what have today?</label> <input type="text" id="new-todo" class="todo-input" placeholder="english homework"> <ul id="todo-list&q

percona - Mysqldump broken CREATE VIEW export -

my database backup through mysqldump created wrong source sql query database views. source columns "1". can export view definition using mysql workbench , same db user fine. here example of view definition produced mysqldump drop table if exists `my_table_name`; /*!50001 drop view if exists `my_table_name`*/; set @saved_cs_client = @@character_set_client; set character_set_client = utf8; /*!50001 create view `my_table_name` select 1 `id`, 1 `col1`, 1 `col2`, 1 `col3`, 1 `col4`, 1 `col5`*/; set character_set_client = @saved_cs_client; the same thing happens on percona server 5.6.12 , 5.6.25

angularjs - Fetch single field from mongodb in meteor -

i'm new meteor framework want fetch single collection accountnames = new mongo.collection("accounttypemaster"); i created collection using db.createcollection("accounttypemaster") this.helpers({ accountnames: () => { return accountnames.find({}, {fields: {name: 1}}); } }); using above query i'm unable fetch single field "name" collection. i'm sure what's wrong code. you need change how instantiate collection. correct meteor syntax be: accountnames = new mongo.collection("accounttypemaster"); helpers need attached template. remember, helpers run on client-side code. if (meteor.isclient) { // code runs on client template.body.helpers({ tasks: function () { return accountnames.find({}, { fields: { name: 1 } }); } }); }

jquery - fadeOut, addClass to background then fadeIn -

i'm trying add fade in , fade out effect change of background of div lies fixed under main content, when user clicks buttons content, background changes it: works. i tried add css transitions firefox doesn't seem support them background change. then tried code doesn't make need. think i'm missing something, can suggest better sequence backgrounds change softly? tried delay(1000) , again, fails fade changed backgrounds. what problem? change of image happens right after click, before fadeout. jquery('.button').click(function() { jquery('#home-wrapper').fadeout(999); jquery('#home-wrapper').removeclass('default_background'); jquery('#home-wrapper').addclass('filter_music').fadein(999); }); you need use callback parameter of fadeout class changed after animation ends. try this: jquery(function($) { $('.button').click(function() { $('#home-wrapper').fadeout(999, f

php - Magento 2: Can't update product stock (quantity) -

i created console command loops through products , attempts update stock quantity. reindex (from command line) after it's completed never changes. on vagrant box has php7 install, , getting "segmentation fault" when got save() method, had change indexer "update on schedule" in admin section , run indexer command line manually, i'm still not seeing product quantity update. there else need in order product save properly? <?php namespace myapp\productupdate\console\command; use symfony\component\console\command\command; use symfony\component\console\input\inputinterface; use symfony\component\console\output\outputinterface; use magento\catalog\api\data\productinterface; use magento\catalog\api\productrepositoryinterface; use magento\framework\api\filterbuilder; use magento\framework\api\searchcriteriabuilder; use magento\catalog\model\product\interceptor; use magento\framework\app\state; use magento\framework\app\objectmanager\configloader; use magen

java - Method delegation with Byte Buddy -

i have problem getting simple example working byte buddy, here's code: import static java.util.arrays.aslist; import java.util.stream.stream; import net.bytebuddy.bytebuddy; import net.bytebuddy.dynamic.loading.classloadingstrategy; import net.bytebuddy.implementation.methoddelegation; public class foo { public static class bar { public void bar (string s, integer i) { system.out.println ("s:" + s + " i:" + i); } } public static class baz { public void baz (integer i, string s) { system.out.println ("i:" + + " s:" + s); } } public static void main (string[] args) { try { class<?> c = new bytebuddy () .subclass (object.class) .definemethod ("bar", void.class, aslist (string.class, integer.class), 1) .intercept (methoddelegation.to (new bar ())) .definemethod ("baz", void.class, aslist (integer.class, string.class), 1) .inte

windows - Print UTF-8 characters in cmd using python -

# -*- coding: utf-8 -*- print "ÆØÅ" when running above script in windows 7 python 2.7.3 using cmd , powershell or cygwin , output: ├Ã¥├ÿ├à the file utf-8 file , works fine in text editor. how can make print "ÆØÅ"? you can force unicode when printing: print u'ÆØÅ'

javascript - Service in AngularJS not working -

i working on simplest possible angularjs app based approach understand flow of it. trying pass simple string service controller , there want print string in index.html. seems rest of code working not service , not sure missing here... index.html <!doctype html> <html ng-app="angularformsapp"> <head> <title>angular form</title> <meta charset="utf-8" /> <link href="content/bootstrap.min.css" rel="stylesheet" /> <script src="scripts/angular.min.js"></script> <script src="app/angularformsapp.js"></script> <script src="app/employeeform/efservice.js"></script> <script src="app/employeeform/efcontroller.js"></script> <!--<script src="app/employeeform/efdirective.js"></script> --> </head> <body> <h1>test angularjs app approach</h1> <div ng-

debugging - C++ variable assignment using 'this' -

i debugging c++ software, in particular, trying work out why field on gui populated after particular button pressed, when should set dashes. have found functions being called when button pressed, , while debugging these functions, particular switch statement run: switch (seltype){ case wptmanager::pointandfromitemselection: case wptmanager::pointselection:{ //on entry page, there should single //waypoint in filter list in wptmanager. //this have been populated prior gaining //access page. int wpindex; cuserrp wpobj; thewptmanager->getfilteredwaypointbyindex(1, &wpindex, &wpobj); //once selected item has been read, reset filter list //to put of waypoints it... , sort them ready //for scrolling (page fwd/page back) thewptm

c# - How to bind a telerik grid to a controller action -

the following code returning me data in json in browser, not displaying telerik mvc grid. public class tipodecanalescontroller : genericcontroller { private unitofwork unitofwork = new unitofwork(); // get: tipodecanales public actionresult index([datasourcerequest] datasourcerequest request) { return json(unitofwork.tipodecanalrepository.get(),jsonrequestbehavior.allowget); } and view @model ienumerable<powerdata.comisiones.models.tipodecanal> @{ viewbag.title = "index"; } <h2>index</h2> @(html.kendo().grid(model) .name("grid") .columns(columns => { columns.bound(p => p.id); columns.bound(p => p.nombre).title("nombre"); columns.bound(p => p.descripcion).title("descripcion"); }) .toolbar(toolbar => toolbar.create()) .editable(editable => editable.mode(grideditmode.popup)) .pageable() .sortab

Java concatenate strings vs static strings -

i try better understanding of strings. making program requires lot of strings. however, lot of strings very similar , merely require different word @ end of string. e.g. string 1 = "i went store , bought milk" string 2 = "i went store , bought eggs" string 3 = "i went store , bought cheese" so question is, approach best suited take when dealing strings? concatenating 2 strings have benefits on having static strings in, example, performance or memory management? e.g. string 1 = "i went store , bought " string 2 = "milk" string 3 = "cheese" string 4 = 1 + 2 string 5 = 1 + 3 i trying figure out optimal way of dealing these strings. (if helps put number of strings using, have 50 number surplus huge amount) as spooky has said main concern code readability. unless working on program phone not need manage resources. being said, doesn't matter whether create lot of strings stand alone or concatenate base

excel - Ruby - Write Data to Existing .xlsx Document -

i have existing xlsx file trying write data programatically. there modern solution ruby? looked google sheets api it's java , .net. i've searched quite bit, , far have checked out following gems no luck: https://github.com/roo-rb/roo https://github.com/randym/axlsx https://github.com/weshatheleopard/rubyxl https://github.com/cxn03651/write_xlsx in meantime seems best solution write csv, import csv xlsx file. it's tough programmatically in future. any appreciated, thanks.

connecting new kannel box to opensmppbox -

i have been trying connect new box (17.x.x.x)which installed kannel on it. have running kannel on box (19.x.x.x) can send sms , recieve. installed opensmppbox on 19.x.x.x . when start opensmppbox shows waiting incomming connections. when start kannel on 17.x.x.x connects smsbox gives error connecting opensmppbox. have spend ling time on this. how can solve problem. here kannel.conf 17.x.x.x # core group = core admin-port=9000 wapbox-port=9001 smsbox-port=9002 admin-password=wass status-password=wing dlr-storage=mysql log-file="/var/log/kannel/bearerbox.log" log-level=0 access-log="/var/log/kannel/access.log" access-log-clean=true access-log-format="%t %l [smsc:%i] [svc:%n] [act:%a] [binf:%b] [fid:%f][from:%p] [to:%p] [flags:%m:%c:%m:%c:%d] [msg:%l:%b] [udh:%u:%u]" box-allow-ip="*.*.*.*" unified-prefix="0234,+234,00234" ####################################### # wapbox box group = wapbox bearerbox-host = 127.0.0.1 log-file = &

Javascript : Uncheck a different checkbox when one checkbox is Unchecked -

i know kinda duplicate , trying in different way , re-posting question. what trying achieve , when "un-check" ospf checkbox .. passive interface check should "uncheched" automatically. i'm trying debug why unchecked not working, no luck. below code. ospf <input type="checkbox" name="ospfen" id="ospfen_1" onclick="if(this.unchecked){document.getelementbyid('ospfpassive_1').checked=false;}">&nbsp; passive interface<input type="checkbox" name="ospfpassive" id="ospfpassive_1" onclick="if(this.checked){document.getelementbyid('ospfen_1').checked=true;}"> <br /> i wanted if check passive interface checkbox...the ospf should checked , part of code working fine. "un-check" not working. thanks in advance the property unchecked not exists. use check checked :) ospf <input type="checkbox" name="ospfen&

c# - Controller requires lowercase in MVC3 -

i added new controller called "listcontroller" in mvc project if write in browser url http://localhost:1509/list works fine but if write in browser url "http://localhost:1509/list" erorr page the difference if letter l in url capitalized or lowercase letter what causes it either case sensitive routing has been configured in global.asax file without knowing it, or missing something. asp.net mvc routing urls not case sensitive default. "home", "home", "home", etc.. exact same far mvc routing engine concerned. here url scottgu explains asp.net mvc url routing rules how work. scottgu - asp.net mvc framework: url routing

Get the X509 certificate from Amazon in C# -

i using amazon sns (simple notification service) notify me data. before use data sent, want authenticate if data has not been tampered with. can please point me how can x509 certificate amazon. have certificate url need 'retrieve certificate' , public key used verify data. i have tried various options haven't come across solution retrieves certificate public key thanks in advance

opengraph - How to Display a Different Facebook Caption from URL? -

Image
what mean caption "kdavkdav.com" below description. i want change other words, like, google.com. when try post url http://kdavkdav.com/2016/01/07/xxxxx/ facebook fetched meta tag in <head> tag below produce info pic shows above. <meta property="og:type" content="website"> <meta property="og:description" content="description"> <meta property="og:locale" content="en_gb"> <meta property="og:title" content="coaches wisdom telesummit" /> <meta property="og:site_name" content="imdb" /> <meta property="og:url" content="google.com" /> i know possible, because of video https://www.youtube.com/watch?v=tccpfpvrvkk 1:40 minutes , result stops @ 2:46 minutes thank you

sql server - Adding Conditional around query increases time by over 2400% -

update: query plan can. we had poor performing query took 4 minutes particular organization. after usual recompiling stored proc , updating statistics didn't help, re-wrote if exists(...) select count(*)... , stored procedure when 4 minutes 70 milliseconds. problem conditional makes 70 ms query take 4 minutes? see examples these take 4+ minutes: if ( select count(*) observationorganism omo join observation om on om.observationid = omo.observationmicid join organism o on o.organismid = omo.organismid join observationmicdrug omd on omd.observationorganismid = omo.observationorganismid join sirn srn on srn.sirnid = omd.sirnid join organismdrug od on od.organismdrugid = omd.organismdrugid om.statuscode in ('f', 'c') , o.organismgroupid <> -1 , od.organismdruggroupid <> -1 , (om.labtype <> 'screen' or om.labtype n

powershell - Diskspace info from a remote server, multiple drives in one string no CR LF -

i want remote server's disk drive , current diskspace info (for drivetype 3, no cd's or removables) in single string inclusion in server inventory spreadsheet (a status snapshot). the following code: get-wmiobject win32_volume -computer <servername> -filter "drivetype='3'"| select driveletter, @{name="capacity (gb)";expression={[math]::round(($_.capacity/1gb),2)}}, @{name="freespace (gb)";expression={[math]::round(($_.freespace/1gb),2)}} gives me output this: driveletter capacity (gb) freespace (gb) ----------- ------------- -------------- c: 50 38.89 e: 309.99 26.28 p: 10 5.95 i prefer this, on 1 line can stuff in spreadsheet: c:\38.89/50 e:\26.28\309.99 p:\5.95\10 but i'm unsure of how on single line. $result = '' get-wmiobject win32_volume -computer $en

In Excel, how can I set up a VBA ComboBox so that it still works if the worksheet is copied? -

in excel 2010, can create activex combobox in worksheet , configure give me list of worksheets, , activate whichever worksheet select. however, if copy worksheet containing combobox, new combobox dead. have duplicate vba code makes work, changing labels accordingly. is there way set works automatically if copy worksheet? this how i'm doing it: microsoft excel objects \ thisworkbook: private sub workbook_open() ' rebuild list of sheets worksheet combobox. dim long = 1 thisworkbook.sheets.count sheet1.combobox1.additem sheets(i).name next end sub microsoft excel objects \ sheet1(sheet1): private sub combobox1_change() sheet1.combobox1 sheets(.list(.listindex)).activate end end sub do in workbook module: private sub workbook_open() call populateboxes(sheet1) end sub in standard module, this: sub populateboxes(ws worksheet) dim sht worksheet 'populate combobox on sheet 1 dim obj

javascript - Node.JS: Getting error : [nodemon] Internal watch failed: watch ENOSPC -

i installed node.js on ubuntu 14.04 operating system first time. installed npm . next step in installation process installing nodemon . worked out fine. but, when run nodemon typing nodemon app.js in command line, following error... [nodemon] 1.8.1 [nodemon] restart @ time, enter rs [nodemon] watching: *.* [nodemon] starting node app.js [nodemon] internal watch failed: watch enospc in command line below error... alopex@alopex:~/desktop/coding_dojo/week-9/javascript/node/testing_node$ hello world why happening? normal behavior nodemon? if not, how can fix it? side notes... 1) app.js javascript file console.log(111) inside of it. 2) node version v0.10.25 3) npm version 1.3.10 4) nodemon version 1.8.1 5) ubuntu version is... distributor id: ubuntu description: ubuntu 14.04.3 lts release: 14.04 codename: trusty it appears max ports weren't configured correctly. ran following code , worked... echo fs.inotify.max_user_watches=5

android - Saving an Object containing Bitmap -

i'm working on android application (first application-beginner) , i'm trying save data when app closes load again. the data want store list of books, , each book contains info (author, date, etc) , bitmap containing book's picture. tried using gson convert list json , store in sharedpreferences caused problems because of bitmap. how should save file , retrieve again when app launches ? this brief version of code library class public class library { private arraylist<entry> library ; public library () { library = new arraylist<entry>(); } public void addentry( entry entry ) { library.add(entry); } public void removeentry ( entry entry ) { if (library.contains(entry)) library.remove(entry); else log.d ( "library" , "entry not found"); } public arraylist<entry> getlibrary() { return

android - GCM Network Manager, are multiple one off tasks exeucted in sequential order? -

introduction i have app let's user favourite list of music albums. music albums content stored on device allow offline access. the favourite choices stored offline via local sqlite database if internet active favourite request call happens normal however, support in offline mode. i came across gcm network manager allow me schedule task when network active every favourite request made offline scheduled. the problem & questions i've gone through documentations , searched cannot find answers these questions. can submit multiple one-off tasks have same tag , ensure not overridden? ask because docs setupdatecurrent method of 1 off task builder classis default false suggest not overridden. however, settag method states if tag same pre-existing task updated not want. i want queue same task because unique music album favourite request i reliased above can solved setting tag of music album id have not know order gcm job manager execute tasks. use example he

playframework - Identify why Google app engine is slow -

i developed application client uses play framework 1.x , runs on gae. app works great, crazy slow. takes around 30 seconds load simple page runs faster - no code change whatsoever. are there way identify why it's running slow? tried contact support couldnt find telephone number or email. there no response on official google group. how approach problem? customer angry because of slow loading time, switching other provider last option @ moment. use gae appstats profile remote procedure calls. of rpcs slow (google cloud storage, google cloud sql, ...), if can reduce amount of rpcs or can use caching datastructures, use them -> application faster. can see appstats parts slow , if need attention :) . for example, i've created google cloud storage cache application , decreased execution time 2 minutes under 30 seconds. rpcs bottleneck in gae.

java - Enable static import wildcards for some classes in Intellij IDEA -

Image
i want enable static import wildcards classes used in tests, e.g. org.hamcrest.matchers . so, when i'll execute optimize imports action instead of : import static org.hamcrest.matchers.any; import static org.hamcrest.matchers.is; i : import static org.hamcrest.matchers.*; is possible in idea ? solution settings :: editor :: code style :: java => imports.

linux device driver - Error in accessing skb (skb->data) -

i'm trying allocate sk_buff in code , access skb->data area. null pointer deference. openwrt: barrier breaker code: struct sk_buff *skb = null; skb = __dev_alloc_skb(2400,gfp_atomic); if (skb) { printk("head= %p \n data= %p \n tail= %p\n end= %p\n len= %d\n", skb->head,skb->data,skb->tail,skb->end,skb->len); memset(skb->data,0,2400); } dump: i following stack trace: [ 61.200000] head = ce1dca00 [ 61.200000] data = 00000b20 [ 61.210000] tail = ce1dd360 [ 61.210000] end = ce1dc9c0 [ 61.210000] len = 0 [ 61.210000] unable handle kernel null pointer dereference @ virtual address 00000b20 [ 61.220000] pgd = ce240000 [ 61.220000] [00000b20] *pgd=2e554831, *pte=00000000, *ppte=00000000 [ 61.230000] internal error: oops: 817 [#1] smp arm [ 61.230000] modules linked in: eng qcserial pppoe ppp_async option iptable_nat usb_wwan sierra_net sierra qmi_wwan pppox ppp_generic pl2303 nf_nat_ipv4 nf_conntrack_ipv4 mac80